Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Simple JMF example does not work  RSS feed

 
SoonAnn Lim
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
I download the example code of PlayerApplet.java from sun programmer guide. I can compile this file. However, when i try to use my browser to open the html page the display the applet, i see the error in java console saying
java.lang.NoClassDefFoundError: javax/media/ControllerListener
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I know i don't have the .mpg file in my directory. However, i see this error instead of file not found error. It seems my browser cannot find where to look for javax.media.* packages in jmf.jar. How can i overcome this problem? I am using both IE5 and Mozilla1.0RC2. Thanks.
 
Rene Liebmann
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you use the Plugin? Do you insert the jar to the applet tag, so that the jar is transferred to the client?
 
SoonAnn Lim
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you tell me more how to insert jmf.jar into applet tag? I use the applet tag provided by tutorial which looks like this
**************************
<APPLET CODE=PlayerApplet
WIDTH=320 HEIGHT=300> <PARAM NAME=FILE VALUE="sample2.mpg">
</APPLET>
*****************************************
I change the CODE=ExampleMedia.PlayerApplet to the above because i don't specific a package. I don't have sample2.mpg but i will substitute with my own mpg file.
Thanks.
 
SoonAnn Lim
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, i get the applet running but i can hear the sound but cannot see the pictures. I see this error on my console
Unable to handle format: MPEG, 176x112, FrameRate=29.9, Length=29568
Unable to handle format: mpegaudio, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 8000.0 frame rate, FrameSize=32768 bits
Can someone help me?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!