• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help needed

 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey guys, please help me.

Sooooon...
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Everybody's invited. Except this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic