wood burning stoves 2.0*
The moose likes Applets and the fly likes How to issue a pop-up when Applet libraries are not found ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "How to issue a pop-up when Applet libraries are not found ?" Watch "How to issue a pop-up when Applet libraries are not found ?" New topic
Author

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

Francesco Marchioni
author
Ranch Hand

Joined: Sep 22, 2003
Posts: 191
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


WildFly 8 Administration Book - JBoss Tutorials
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to issue a pop-up when Applet libraries are not found ?