• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

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:

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.....
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!