• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help needed

 
Shashank Agarwal
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9312
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Shashank Agarwal
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys, please help me.

Sooooon...
 
ch praveen
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic