| Author |
Another Applet on Tomcat
|
Max Qua
Greenhorn
Joined: Sep 27, 2008
Posts: 20
|
|
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
Joined: Sep 27, 2008
Posts: 20
|
|
Sorry, it was not clear in the last post but ChessGame.jar is in the following path: WebContent/dist/lib /Max
|
 |
 |
|
|
subject: Another Applet on Tomcat
|
|
|