• 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 ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Another Applet on Tomcat

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
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
|
+-dist
| |
| +-lib
| |
| +-ChessGame.jar (this is the applet)
+-lib
| |
| +- (other libraries *.jar used by ChessGame.jar)
+-META-INF
+-WEB-INF
|
+-chess.html

Here below there is the html file chess.html

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

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
 
Max Qua
Greenhorn
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:

WebContent/dist/lib

/Max
 
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
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic