Re: javax.media.* package
i am trying to work on an example that uses the javax.media package, but the package is not found. Any ideas on importing a package or whatever to get my example to work?
thanks a million
It may have something to do with the way you're building your MediaLocator. They should be URL-like.
myLocator = new MediaLocator("file:\\"+adVids[currVid].getAbsolutePath());
Similar Messages
-
Need javax.media package
Hi.. Everyone
where do i get this javax.media package ? will it not be available with jdk?
Thanks in advance.Some of it is included with JMF...you have to install JMF specificlly to have access to the javax.media classes that JMF uses...
-
Import javax.media.* is not working
Hi,
I'm new to java and i was trying to create a media player using the javax.media package from the JMF. I installed it using the windows setup and it seemed to install correctly. Testing it with the java.sun.com applet tester worked. The media player is also working...
The only problem is that when i import javax.medis.* it gives me a compiler error:
package javax.media does not exist
my code is as follows:
import java.applet.*;
import java.awt.*;
import java.net.*;
import javax.media.*;
public class PlayerApplet extends Applet {
Player player = null;
public void init() {
setLayout( new BorderLayout() );
String mediaFile = getParameter( "FILE" );
try{
URL mediaURL = new URL( getDocumentBase(), mediaFile );
player = Manager.createRealizedPlayer( mediaURL );
if (player.getVisualComponent() != null)
add("Center", player.getVisualComponent());
if (player.getControlPanelComponent() != null)
add("South", player.getControlPanelComponent());
catch (Exception e){
System.err.println( "Got exception " + e );
public void start() {
player.start();
public void stop() {
player.stop();
player.deallocate();
public void destroy() {
player.close();
} Could someone please help me out here... i've tried all the few probable solutions... but to no avail...Well changing the classpath to the correct one still didn't work.... but i still found the solution.
The Developer Environment that i use is JCreator and it seems it ignores the classpath and has its own settings for the class path... changing this also didn't work.
What worked was copying the Jar files from the JMF2.1.1e installed location into the path of the original classpath -
Problem to find the javax.media.jai package
hi everyone!! it's not the first time I ask this question, but i have troubles to find javax.media.jai..
I've downloaded the jai 1.1 and everything is fine... However, I have to use classes from the javax.media.jai... I made the import, and it doesn't find it, as if it doesn't exist... Someone tells me that the jai contained it, so why doesn't it find it??
i'm using a java version 1.2.. do you think that is the problem?
thanks a lot, and sorry for my bad english!!
Anne.thanks a lot!!! it helps me but doesn't resolve my problem!! ;o)
you may be right,, it's a classpath problem. well i work under unix, so i have to give my classpath by the command setenv CLASSPATH ...
i didn't find the jai_core.jar in my JAI 1.1, I have only the BugFixes.jar...
I tried to download the latest version of JAI, and unfortunately i have a new problem with the .tar, i don't manage to "open" it... the command
tar xvf [archieve file] gives me some errors!!
so I don't know what I'm gonna do.... I think I'm going to ask someone to send me the package, or the specific classes I need, it would be more easier!!
Thanks
Anne. -
Package javax.media.jai does not exists
I am geting this error
'package javax.media.jai does not exists'
when I try to compile my Java Application in Netbeans.
i have upgraded from JDK 1.5_06 to JDK 1.6_27 and no other code changes
Earlier I was using jai_codec.jar and jai.core.jar with JDK 1.5_06.
Can anyone help me with this?Where can I download the latest jai_codec and jai_core.jar files
that are compatible with JDK 1.6_27 ?
Thanks885522 wrote:
Earlier I was using jai_codec.jar and jai.core.jar with JDK 1.5_06.So keep using them. -
Package javax.media doesnot exits
Hi,
I have installed JMF,but am still facing the error "package javax.media doesnot exits"
when i tried to import javax.media.*You need to import JMF's library JAR files
-
"package javax.media does not exist" error message. Help!
May be this is a rookie problem, but I can't solve it by myself.
I'm using JBuider X to develop a GUI, and need to capture an image, from a web cam or so, and to save it in DB.
The problem is: I found some source codes wich are supposed to do this... but they references (imports) an javax.media class... and the JBuilder says that this class doesn't exists.
Can anyone help me?
Where can I get the class, and how I inform to JBuider where it's located?
Thanks in advance.
Ernesto BeckerProject tab, "Build", Libraries -> import the JMF libraries. Something like that.
-
Javax.media Where download it?
Hi all.
I've downloaded and create the jmf.jar from jmf-2_1_1e-scsl-bin.
Now I try to compile this:
[cut]
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGEncodeParam;
import com.sun.image.codec.jpeg.JPEGImageEncoder;
import javax.media.*;
import javax.media.control.FrameGrabbingControl;
import javax.media.format.VideoFormat;
import javax.media.util.BufferToImage;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.image.BufferedImage;
import java.io.FileOutputStream;
[cut]
but I've this errors:
[cut]
Scan.java [15:1] package javax.media does not exist
import javax.media.*;
^
Scan.java [16:1] package javax.media.control does not exist
import javax.media.control.FrameGrabbingControl;
^
Scan.java [17:1] package javax.media.format does not exist
import javax.media.format.VideoFormat;
^
Scan.java [18:1] package javax.media.util does not exist
import javax.media.util.BufferToImage;
^
4 errors
Errors compiling Scan.
[cut]
So, where I've to download the javax.media pakage?
thank you.
jmaxosft
[cut]Try:
http://java.sun.com/products/java-media/jmf/2.1.1/download.html
Yous should choose cross-platform java and in zip file you have
in directory :src\share\ packet source for javax, copy it to your
project directory and that's it...
I hope it helps... -
Downloading javax.media.jai.JAI
hi,
helo im new to this forum. Can anybody plz help me in downloading the package "javax.media.jai.JAI". Please let me know where can i download the above package. This is very important to me plz help me.Hey,
Search google man.....Type JAI software for download...u find setup file.......
Best Of Luck!
Rgds, -
Import javax.media?
i have been trying to play a video from a application and i get a bunch of compile errors one is "package javax.media does not exist" because of this im getting 14 other errors, can anyone help me? i just downloaded and installed Java SDK 1.4.2 and i have jdk1.5.0_05 and jre1.5.0_05. so i should be up to date
Well changing the classpath to the correct one still didn't work.... but i still found the solution.
The Developer Environment that i use is JCreator and it seems it ignores the classpath and has its own settings for the class path... changing this also didn't work.
What worked was copying the Jar files from the JMF2.1.1e installed location into the path of the original classpath -
Where is the javax sound package for download?
Where is the javax sound package for download? (URL) I got the latest JDK yesterday and tried to compile some audio applet but it looks like all of the Javax stuff is missing from the latest JDK.
Where do I download the javax sound package ?
DanThis is an audio player that another posted here. I tried to compile and run it but here were the results.
javac SimplePlayerApplet.javaSimplePlayerApplet.java:9: package javax.media does not exist
import javax.media.*;
^
SimplePlayerApplet.java:11: cannot find symbol
symbol: class ControllerListener
public class SimplePlayerApplet extends Applet implements ControllerListener {
^
SimplePlayerApplet.java:14: cannot find symbol
symbol : class Player
location: class SimplePlayerApplet
Player player = null;
^
SimplePlayerApplet.java:122: cannot find symbol
symbol : class ControllerEvent
location: class SimplePlayerApplet
public synchronized void controllerUpdate(ControllerEvent event) {
^
SimplePlayerApplet.java:44: cannot find symbol
symbol : class MediaLocator
location: class SimplePlayerApplet
MediaLocator mrl = null;
^
SimplePlayerApplet.java:63: cannot find symbol
symbol : class MediaLocator
location: class SimplePlayerApplet
if ((mrl = new MediaLocator(mediaFile)) == null)
^
SimplePlayerApplet.java:68: cannot find symbol
symbol : variable Manager
location: class SimplePlayerApplet
player = Manager.createPlayer(mrl);
^
SimplePlayerApplet.java:69: cannot find symbol
symbol : class NoPlayerException
location: class SimplePlayerApplet
} catch (NoPlayerException e) {
^
SimplePlayerApplet.java:130: cannot find symbol
symbol : class RealizeCompleteEvent
location: class SimplePlayerApplet
if (event instanceof RealizeCompleteEvent) {
^
SimplePlayerApplet.java:165: cannot find symbol
symbol : class CachingControlEvent
location: class SimplePlayerApplet
} else if (event instanceof CachingControlEvent) {
^
SimplePlayerApplet.java:166: cannot find symbol
symbol : variable Controller
location: class SimplePlayerApplet
if (player.getState() > Controller.Realizing)
^
SimplePlayerApplet.java:170: cannot find symbol
symbol : class CachingControlEvent
location: class SimplePlayerApplet
CachingControlEvent e = (CachingControlEvent) event;
^
SimplePlayerApplet.java:170: cannot find symbol
symbol : class CachingControlEvent
location: class SimplePlayerApplet
CachingControlEvent e = (CachingControlEvent) event;
^
SimplePlayerApplet.java:171: cannot find symbol
symbol : class CachingControl
location: class SimplePlayerApplet
CachingControl cc = e.getCachingControl();
^
SimplePlayerApplet.java:181: cannot find symbol
symbol : class EndOfMediaEvent
location: class SimplePlayerApplet
} else if (event instanceof EndOfMediaEvent) {
^
SimplePlayerApplet.java:184: cannot find symbol
symbol : class Time
location: class SimplePlayerApplet
player.setMediaTime(new Time(0));
^
SimplePlayerApplet.java:186: cannot find symbol
symbol : class ControllerErrorEvent
location: class SimplePlayerApplet
} else if (event instanceof ControllerErrorEvent) {
^
SimplePlayerApplet.java:189: cannot find symbol
symbol : class ControllerErrorEvent
location: class SimplePlayerApplet
Fatal(((ControllerErrorEvent)event).getMessage());
^
SimplePlayerApplet.java:190: cannot find symbol
symbol : class ControllerClosedEvent
location: class SimplePlayerApplet
} else if (event instanceof ControllerClosedEvent) {
^
19 errors
So what am I missing ...and where do I get it ??
Dan -
Where can i find Java.media package
Hi All
Someone please advise me where can i find the java.media package. Any help will be welcomed.
Thanks
ShanIt seems that java.media was changed to javax.media from JMF 1.0.2 Apperently the source code that you have is old. Check out the following page:
http://java.sun.com/products/java-media/jmf/1.0/guide/JavaMediaFrameP.doc.html
Ahmed -
Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/jai/
After I got this exception, I tried the following solution:
I downloaded the Windows package for JAI from this link:
https://jai-imageio.dev.java.net/binary-builds.html
Then I went to the Projects window > Libraries (Netbeans IDE) and browsed to the two jar files in that download. The two jar files are now showing under the Libraries node and, accordingly, they are listed in my Classpath as this:
..\..\..\Desktop\jai-imageio-1_2-pre-dr-b04-lib-windows-i586-07_Apr_2009\lib\ext\jai_imageio.jar
..\..\..\Desktop\jai-imageio-1_2-pre-dr-b04-lib-windows-i586-07_Apr_2009\lib\ext\clibwrapper_jiio.jar
There also a couple of DLL files which I wasn't sure how to add.
So why am I still getting this error? Maybe it's the wrong version of JAI?This research made me VERY late for work and I've been swamped all day. Didn't have a chance to post my solution earlier.
"It appears that you have downloaded wrong package... try downloading and installing the stable release " jai_imageio-1_1-lib-windows-i586-jdk.exe ".
I didn't know how to install that one. I tried clicking it and got an error msg. Then I added it as a reference (I browsed to it from the Libraries node) which "seemed" to work (allowed me to run my app using F6) but then it wouldn't produce a deployment package when I seleced Run > Clean and Build. So I went back and downloaded the "Daily Build" which unzips to two jar files
jai_imageio.jar
clibwrapper_jiio.jar
and immedliately Run > Clean and Build produced a deployment package. (All of this is to get PDFbox running in my app). I also needed jai_core.jar which I believe was from this page:
http://code.google.com/p/mapmap/downloads/detail?name=jai_core.jar&can=2&q=
specifically this link:
http://mapmap.googlecode.com/files/jai_core.jar
By the way I am using a "Daily Build" for PDFbox (0.7.4) which came from the "FOP" downloads here:
http://www.jeremias-maerki.ch/download/fop/pdf-images/
but I still needed the older pdfbox 0.7.3 download just to extract the Fontbox.jar from it. I needed a codec from this page as well:
http://www.findjar.com/jar/geoserver/jai/jars/jai_codec-1.1.3-alpha.jar.html
the codec was offered as a one-link download:
http://www.findjar.com/jar/geoserver/jai/jars/jai_codec-1.1.3-alpha.jar.html
The upshot of all this is that I can now work with more types of PDF files than before - but still not all of them. I'm getting another error on some of them (I'll have to reproduce this at home). -
Where is the javax.media.j3d
Hi I install Java3d JDK 1.4.2 but i have only one jar file with com.sun... utility java 3d package what I must do to have package javax.media.j3d?And do I can use java 3d to create games?
Hi I install Java3d JDK 1.4.2 but i have only one jar
file with com.sun... utility java 3d package what I
must do to have package javax.media.j3d?For me it was straight forward process of installing the complete J3D. Extract the files to YOUR_JDK_PATH/jre/lib/ext and/or tell java via the CLASSPATH variable to use the jar's.
And do I can use java 3d to create games?Yes...if you put some brain and effort in it. There are several projects in the web, which care about game programming using J3D. Try to google for them.
Hope this helps.
Kai -
Javax.media.CannotRealizeException
package mediaplayer;
import javax.swing.*;
import java.awt.*;
import javax.media.*;
import java.net.*;
public class PlayerFrame extends JFrame
public PlayerFrame() throws Exception
setSize(500, 400);
Manager.setHint( Manager.LIGHTWEIGHT_RENDERER, true);
Player p = Manager.createRealizedPlayer(new URL("http://rds.yahoo.com/_ylt=A0SO8Z0s8ntIvv0AdxX8w8QF;_ylu=X3oDMTA4NDgyNWN0BHNlYwNwcm9m/SIG=12a3nctk9/EXP=1216168876/**http%3a//www.doupe.cz/vaulty/finalfantasy/movies/cnn.avi"));
Component video = p.getVisualComponent();
Component panel = p.getControlPanelComponent();
if(video != null)
add(video);
if(panel != null)
add(panel, BorderLayout.SOUTH);
p.start();
Unable to handle format: DX50, 640x320, FrameRate=29.9, Length=1228800 0 extra bytes
Unable to handle format: mpeglayer3, 24000.0 Hz, 0-bit, Stereo, Unsigned, 8000.0 frame rate, FrameSize=8 bits
Failed to realize: com.sun.media.PlaybackEngine@105bd58
Error: Unable to realize com.sun.media.PlaybackEngine@105bd58
Exception in thread "main" javax.media.CannotRealizeException
at javax.media.Manager.blockingCall(Manager.java:2005)
at javax.media.Manager.createRealizedPlayer(Manager.java:528)
at mediaplayer.PlayerFrame.<init>(PlayerFrame.java:14)
at mediaplayer.Main.main(Main.java:9)The file you are trying to play is in an unsupported format.
Supported formats:
http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/formats.html
Maybe you are looking for
-
Red laser toner not printing on MFP M476Nw
Just bought a brand new HP Color Laserjet Pro MFP M476nw. Everything set up smooth as silk, but the red toner refuses to print. I have ran the print calibration several times but it doesn't print a calibration page. It says printing document but noth
-
I get an error message that says an instance of mozilla firefox is already running, please close it to continue. The question already explains the situation. I need all three terminals to use firefox concurrently. Did not have this problem with the p
-
Have to connect twice via Airplay to hear music?
It does this frequently, but regardless of reconnecting, updating, resetting, and reinstalling iTunes, in order to make the Apple TV function through Airplay while powered on, we're required to connect via Airplay, disconnect, and reconnect, in order
-
Hi, Some one can tell, in report MC46, what is the days shown as "days since consumption" ?. While analyzing the report, i have observed for the materials if no consumption, system is showing the number of days from the date of creation of the ma
-
I keep getting an Applescript error -600.........application isn't running. When I click on "ok" Cocktail opens and runs pilot. The script is then gone but eventually comes back. Is there any way to stop this error from appearing? Thanks for helpi