2

running this applet on some machines wont work but then on some other's it works just fine. in all cases looks like JRE 1.6.0_26 has been installed.

<script type="text/javascript" src="http://www.java.com/js/deployJava.js"></script>
<script>
var attributes = {codebase:'http://kash-dev/applet/',
        code:'Auth.class',
    archive:'Auth.jar',
    id: 'auth',
    width:0, height:0} ;
    var version = '1.6' ;
deployJava.runApplet(attributes, null, version);
</script>

Here's the error:

load: class Auth.class not found.
java.lang.ClassNotFoundException: Auth.class
        at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
        at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
        at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
        at sun.plugin2.applet.Plugin2ClassLoader.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)
Exception: java.lang.ClassNotFoundException: Auth.class
3
  • 1
    Some stupid question, all machines have access to the jar located on you dev server? Try using JNLP as an alternative. Commented Sep 10, 2011 at 0:58
  • 1
    try turning off jar caching on the machines that are having trouble in the java control panel. If after doing this it works, you had old jar versions cached. Commented Sep 10, 2011 at 3:25
  • all client machines are on the same network and can see kash-dev. Commented Sep 10, 2011 at 17:46

3 Answers 3

2
  1. http://kash-dev/applet/ is not a real URL, so I'm surprised it works on any computer.
  2. width:0, height:0 Any self-respecting spam suppression software (virus checker etc.) will silently and automatically remove HTML elements with 0 size. Give it a size of 10x10 and use CSS to hide it (possibly using the display attribute, but even better by moving it to a position that is 'off the page' - e.g. by putting it at -50,-50 relative to the top-left corner of the page).
Sign up to request clarification or add additional context in comments.

3 Comments

@Kash22 Have you fixed the width & height of the applet?
not yet but I don't see how that is related to my problem. If as you said, suppression software was to "remove" the element from the page due to width/height of 0, then java plugin shouldn't even kick in in the first place to generate the class not found exception
"I don't see how that is related to my problem" If you are not willing to experiment, I can't see this problem being solved. But hey, good luck with it - I'm outta' here..
1

I would double check what version of Java is on each machine. The only time I have seen this kind of error - ClassNotFound on one computer but not another - is when the applet or jar is compiled by a later version of Java than the one installed e.g. trying to run a Java 7 compiled applet/jar on a machine with Java 6.

1 Comment

I compiled the the applet using 1.6.0_15 and the client with the exception is running java plug-in 1.6.0_26 and JRE 1.6.0_26-b03
0

It turns out that the network proxy setting in Java control panel was set to "user proxy server" even-though the settings for it's address/port was identical to that set in the "browser settings" JVM was not able to resolve the JAR file URL correctly. Switching to "use browser setting" resolved the problem. Thank you all who responded.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.