• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Simple JMF example does not work

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
If you want to look young and thin, hang around old, fat people. Or this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic