I am facing problems when I try to execute an applet from a Struts application, I have seen some threads but none posted the last code to resolve it.
I want to call an applet from one of my jsp's under web/jsp
I created the folder applets under web as well and I placed the JavaApplication15.jar which is only a Main.class (no packages, no libs... just a System.out.println to know if it is being called)
it works if I call the applet from a static html file with
I have tried to include this applet into my struts app but I always get "java.lang.ClassNotFoundException: Main.class"
I tried to copy the jar into web/applets and call it with or
I tried to unpack the jar,place the classes under web/applets/JavaApplication15 and call with
unpack the jar,place the classes under web/applets/ and call with
I even tried to copy Main.class to the same folder where I have the JSP /web/jsp/admin and call with without "archive" or "codebase"
Whatever I try, I always get the ClassNotFoundException. What am I doing wrong!
You should not use an applet's constructor, by the way. An applet's lifycycle is handled by the browser - if you need to do something when the applet is created, override its init() method and put your code there.
Joined: Apr 18, 2011
I checked and yes, and I can download the jar if I paste the url.
I add, I try to run the applet in Firefox, If I try in IE I get another error: java.lang.RuntimeException: java.lang.ExceptionInInitializerError.