This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Applets and the fly likes Java Applet Class not found exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Java Applet Class not found exception" Watch "Java Applet Class not found exception" New topic
Author

Java Applet Class not found exception

Ben Pagan
Greenhorn

Joined: Mar 21, 2007
Posts: 5
Hi, I am attempting to deploy a java applet but keep encountering the following error.

load: class com.gro.applet.GROAuthenticateApplet not found.
java.lang.ClassNotFoundException: com.gro.applet.GROAuthenticateApplet
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)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more

The applet starts up when i use appletviewer but won't work in the browser. The applet is contained in a jar in the folder HTML-ASP\ap and is called from an asp script in the folder HTML-ASP\general. The script that calls the jar is outlined below.

<applet
code="com.gro.applet.GROAuthenticateApplet"
codebase="\C:\GRO\Phase 1\Application\50 Implementation\HTML-ASP\ap"
archive="GROAuthenticateApplet.jar, KeyToolsPro_jce1-2-1_signed.jar"
name="GROAuthenticateApplet"
width=0 height=0
alt="Please select your certificate, enter your password and click on the Login button"
longdesc="Java Applet: Please select your certificate from the drop down list,
enter the password for that certificate in the textfield below the
drop down list, and then click on the Login button"
viewastext id=Applet1>
<param name="p12Directory" value="C:\GRO\P12">
<param name="p12BackupDirectory" value="C:\GRO\P12">
<param name="internetProtocol" value="<%=cg_sGen_InternetProtocol%>">
</applet>

I have seen this identical problem on a lot of forums but haven't seen any definitive solution for it. I have already uninstalled and reinstalled internet explorer and the jdk and jre. jre.1.6.0 is selected to be used for applets in internet explorer. I can view any other applets normally. I have noticed that some of the people who have encountered the same problem believed that it was caused by a microsoft product changing their internet settings. Does anyone know anything about this? I will be eternally grateful for any help. Cheers.
Ben Pagan
Greenhorn

Joined: Mar 21, 2007
Posts: 5
Ahem, never mind, I just put my jars into the general folder and it worked. Weird problem though.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java Applet Class not found exception
 
Similar Threads
ClassNotFoundException when online certification validation is enabled
Setting applet path in Java Servlet
Loading java applet from a cab file failed
how to execute applet through webserver
Applet only works with one Java version