aspose file tools*
The moose likes Applets and the fly likes Help needed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Help needed" Watch "Help needed" New topic
Author

Help needed

Shashank Agarwal
Ranch Hand

Joined: May 20, 2004
Posts: 105
Hi guys, I've got a problem with running applets in my browser. Now, this applet of mine is a part of a "non package" application. It is not a swing applet but one of the windows in the application extends JFrame. Now here's the problem. When I run my applet from the appletviewer, it runs fine. But it does not run when I add it into the browser. It gives me "class not found" whereas the class is in the same directory as the html page. This message just flashes in the status bar. Whats surprising is that, I can easily view the applets over the net and my browser has absolutely no problem with 'em. Plz. help soon...
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8997
    
    9

Try opening the java console. See exactly what class it can't find. Share your HTML with us, as well as if you are using the browser's default JVM or the Java Plugin.


[How To Ask Questions On JavaRanch]
Shashank Agarwal
Ranch Hand

Joined: May 20, 2004
Posts: 105
Hi,

The console window says:

Error loading class: MainApplet
java.lang.NoClassDefFoundError
java.lang.ClassNotFoundException: MainApplet
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/applet/AppletPanel.securedClassLoad
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run

the html code is:
<html>
<title>
Main Applet
</title>
<body>
<applet code = MainApplet.class width = 300 height = 200>
</applet>
</body>
</html>

I even tried running the applet using archive but that did'nt work either. I'm able to run applets online. But surprisingly, i'm not able to run the demo applets provided by java with its jdk either.

'elp...
Shashank Agarwal
Ranch Hand

Joined: May 20, 2004
Posts: 105
Hey guys, please help me.

Sooooon...
ch praveen
Ranch Hand

Joined: Mar 08, 2004
Posts: 67
Hello Agarwal,
By default browser uses its own JVM, probably many of them use version 1.1 . So, you must use plugins in browser to enable displaying swing components and a tool such as HTML Converter to change your HTML code (so that it can inform the browser about plugin). But you must make sure that at the client end JDK1.3 must be installed and plugins make the browser to use the installed JDK1.3 to display swing components. Best of luck.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help needed