Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Intermittent classNoFoundException when loading applet

930779Apr 15 2012 — edited May 7 2012
Hi
I have an applet on a PHP page deployed using deployJava.js from the Deployment Toolkit, as follows:

<script src="https://www.java.com/js/deployJava.js"></script>
<script>
var attributes = {codebase:'https://server/web_site/folder containing the jar',
name:'myApplet',
code:'PackageName.ClassName.class',
archive:'Applet_0_042.jar',
width:'100%', height:'100%'} ;
var parameters = {isDemo:'', FileSet:'....this is a very long string of pipe delimited filenames...', java_arguments:'-Xmx400m'} ;
var version = '1.6.0_10';
deployJava.runApplet(attributes, parameters, version);
</script>

The applet is hosted on apache on a Unix server, and the jar was created using the Eclipse IDE 'export to JAR file' functionality.
Some of the time the applet loads as it should on a client machine, other times I get a classNotFoundException, despite the fact that I haven't changed the deployed jar in any way. This happens whether the client machine is behind a proxy or not. I'm tearing my hair out trying to troubleshoot this situation. I've raked the web and have found the suggestion that each flavour of web browser defines its own applet class loader and if a fetch across the Web by this class loader fails, a ClassNotFound exception is thrown. Contrary to this, I thought that it was the java plugin that did all the work. Nevertheless, the suggestions went on to say that the failure to fetch the applet might be related to network loading on the server, .e.g. hitting the connection limit for their server, or network path related.

Can any one comment on 1) the true mechanism by which applets are loaded and 2) more importantly, what might be causing this intermittent failure and how to troubleshoot it.

My job is on the line here, and I would be truly grateful for any help

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 4 2012
Added on Apr 15 2012
5 comments
964 views