简体   繁体   English

Java版本更新后的ClassNotFoundException

[英]ClassNotFoundException after Java version update

I have an old Java web application that still uses Applets (not my decision). 我有一个仍然使用Applet的旧Java Web应用程序(不是我的决定)。

After a recent Java upgrade (I believe it was 1.7 to 1.8) the app now throws a ClassNotFoundException and says that it can't find the JApplet class the Applet derives from before the Applet can load. 在最近的Java升级(我相信是1.7到1.8)之后,该应用程序现在抛出ClassNotFoundException,并说在加载Applet之前找不到Applet派生的JApplet类。

The path to the class is specified in a jsp page called loadApplet.jsp. 类的路径在名为loadApplet.jsp的jsp页面中指定。

Here is the code in the loadApplet.jsp file. 这是loadApplet.jsp文件中的代码。 The only part that isn't an exact copy and paste is ThePathToTheJAppletClassWhichItAlwaysFoundBefore.class - which is just a string that defines where the package is. 唯一不完全复制和粘贴的部分是ThePathToTheJAppletClassWhichItAlwaysFoundBefore.class-这只是一个字符串,用于定义包的位置。

<OBJECT classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase = "https://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,0,0" height = "0" width = "0">
<PARAM NAME = "CODE"          VALUE = "ThePathToTheJAppletClassWhichItAlwaysFoundBefore.class" >
<PARAM NAME = "type"          VALUE = "application/x-java-applet;jpi-version=1.3.1" >
<PARAM NAME = "scriptable"    VALUE = "false" >

Thanks for all the suggestions. 感谢所有的建议。 What happened was during the upgrade the Java Security settings were automatically set to Very High - thus the class on the client could not be found. 发生的事情是在升级期间,Java安全性设置自动设置为“非常高”-因此找不到客户端上的类。 I reset the setting to High and it worked fine. 我将设置重置为“高”,并且工作正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM