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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 190
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 ?
 
Similar Threads
Error while running Weblogic 9.0
JAI with applet problem
Error while running Weblogic from Eclipse
Weblogic with eclipse
Simple JMF example does not work