otFoundException的时候在某些计算机上加载的小程序

otFoundException的时候在某些计算机上加载的小程序

本文介绍了ClassNotFoundException的时候在某些计算机上加载的小程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行某些机器上该applet不会工作,但随后在其他一些就是它工作得很好。在所有情况下看起来像JRE 1.6.0_26已安装完毕。

 <脚本类型=文/ JavaScript的SRC =htt​​p://www.java.com/js/deployJava.js>< / SCRIPT>
<脚本>
VAR属性= {codeBase的:HTTP:// KASH-dev /目录小程序/',
        code:'Auth.class',
    档案:Auth.jar',
    ID:'权威性',
    宽度:0,身高:0};
    VAR的版本='1.6';
deployJava.runApplet(属性,空,版本);
< / SCRIPT>

下面的错误:

 载:类Auth.class未找到。
抛出java.lang.ClassNotFoundException:Auth.class
        在sun.plugin2.applet.Applet2ClassLoader.findClass(来源不明)
        在sun.plugin2.applet.Plugin2ClassLoader.loadClass0(来源不明)
        在sun.plugin2.applet.Plugin2ClassLoader.loadClass(来源不明)
        在sun.plugin2.applet.Plugin2ClassLoader.loadClass(来源不明)
        在java.lang.ClassLoader.loadClass(来源不明)
        在sun.plugin2.applet.Plugin2ClassLoader.load code(来源不明)
        在sun.plugin2.applet.Plugin2Manager.createApplet(来源不明)
        在sun.plugin2.applet.Plugin2Manager $ AppletExecutionRunnable.run(来源不明)
        在java.lang.Thread.run(来源不明)
异常:抛出java.lang.ClassNotFoundException:Auth.class


解决方案

原来,在Java控制面板的网络代理设置设为用户代理服务器,甚至 - 尽管它的地址/端口是相同的设置在浏览器设置JVM那一套不能够正确地解析JAR文件的URL。切换到使用浏览器设置解决了这个问题。谢谢大家谁回答。

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
解决方案

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.

这篇关于ClassNotFoundException的时候在某些计算机上加载的小程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 14:31