views:

629

answers:

3

I am running a Java web applet on one of my servers. For some reason a particular user cannot access it (an error text appears in place of the applet that reads "Error. Click for details"; it is not text I placed between the tags, i.e., his JRE is installed and appears to at the very least be installed correctly but for some reason it is not working on my applet.

I think it has something to do with his particular "flavor" of JRE - this so-called "HotSpot" version. (see this: http://www.experts-exchange.com/Programming/Languages/Java/Q_24405442.html if you have an EE account, I can't remember mine offhand). I am not too familiar with Java itself or it's varieties - I am merely the implementer of the applet in the page (I did not write it).

The applet works fine for me, and every single other user to date. Also, it should not be referring to file as listed below in his error such as "http://mywebsite.com/java/JavaVersionDisplayApplet/class.class". The file is located at "http://mywebsite.com/java/JavaVersionDisplay.class". According to the applet programmer, his error points to a file that is not even specified anywhere in his code.

The users' error reads:

Java Plug-in 1.6.0_13
Using JRE version 1.6.0_13 Java HotSpot(TM) Client VM
User home directory = C:Documents and Settingsjohn

load: class JavaVersionDisplayApplet.class not found.
java.lang.ClassNotFoundException: JavaVersionDisplayApplet.class
       at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
       at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
       at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
       at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://mywebsite.com/java/JavaVersionDisplayApplet/class.class
       at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
       at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
       at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
       at java.security.AccessController.doPrivileged(Native Method)
       ... 7 more
Exception: java.lang.ClassNotFoundException: JavaVersionDisplayApplet.class
load: class JavaVersionDisplayApplet.class not found.
java.lang.ClassNotFoundException: JavaVersionDisplayApplet.class
       at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
       at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
       at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
       at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://mywebsite.com/java/JavaVersionDisplayApplet/class.class
       at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
       at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
       at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
       at java.security.AccessController.doPrivileged(Native Method)
       ... 7 more
Exception: java.lang.ClassNotFoundException: JavaVersionDisplayApplet.class
A: 

I'd start by packaging the application as a jarfile instead of as a set of classfiles. It seems like JavaVersionDisplayApplet.class is being interpreted as a fully-qualified class name...that is, the JVM thinks "JavaVersionDisplayApplet" is a package name and "class" is the class name.

Can you post the contents of the APPLET tag that you're using in the HTML?

rob
A: 

A couple of things you might want to look at:

  1. Is he using Chrome? It seems that Chrome and Java don't play well together quite yet.

  2. Is he using a Proxy server? The "connection failed" error may indicate that he is using a Proxy that is allowing the browser through, but not the JRE.

Eric Petroelje
A: 

This is the culprit:

Caused by: java.io.IOException: open HTTP connection failed:http://mywebsite.com/java/JavaVersionDisplayApplet/class.class

The JVM is started, but it cannot connect to the server hosting the applet. Does the user connect to mywebsite.com or another name?

Thorbjørn Ravn Andersen
Yes, everything takes place on mywebsite.com directly. No remote linking of any files.