• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Another Applet on Tomcat

Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have developed a Web application using an eclipse project. It is a servlet working properly. Now I have developed a client code which is an applet. This applet has been developed using another eclipse project, using ant. The jar file created by ant is automatically saved into the Web application directory. After creating the html code to call the applet, I discovered the class I specifyed in the html gets not found. Could someone help me please? I suspect it is a silly issue but I am wasting a lot of time on it.
This is the dir structure:
- WebContent
| |
| +-lib
| |
| +-ChessGame.jar (this is the applet)
| |
| +- (other libraries *.jar used by ChessGame.jar)

Here below there is the html file chess.html

<APPLET CODE="ChessGame.class" CODEBASE="." ARCHIVE= "dist/lib/ChessGame.jar;lib/*.jar" WIDTH=520 HEIGHT=580></APPLET>

When I load the html page with the browser (IE) the result is:

java.lang.ClassNotFoundException: ChessGame.class
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)

Where I'm wrong?
Max Qua
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, it was not clear in the last post but ChessGame.jar is in the following path:


He loves you so much! And I'm baking the cake! I'm going to put this tiny ad in the cake:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic