This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to issue a pop-up when Applet libraries are not found ?

 
Francesco Marchioni
author
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I've written an Applet which displays a video using Java Media FrameWork libraries.
I'd like that if JMF libraries are not found, then a Dialog box displays a warning.

I've tried adding a basic check in the init() method of the Applet:

try
{
Class.forName("javax.media.MediaLocator");
}
catch(Exception mue) {
final Frame frame = new Frame();
frame.setTitle("JMF non installed!");
.......
}

but unfortunately the exception is caught at a higher level......

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 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)


in fact the applet must implement javax/media/ControllerListener in order to be able to use JMF. How can I catch this event an display the Dialog box ???
Hope somebody can help.....
Thanks
Francescp
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic