javax.swing.JPanel 的 main() 中发生异常java.lang.Error: Unresolved compilation problems:
The import netscape cannot be resolved
JSObject cannot be resolved
at nc.ui.sm.login.AppletContainer.(AppletContainer.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
解决方案:
根据提示很可能是netscape jsobject没有引入导致。故将包含netscape的plugin.jar引入到项目中。
1、查看jre下是否有plugin.jar
下文举例,jre目录换成自己的安装目录。
文件位置如:C:\Program Files (x86)\Java\jre5\lib\plugin.jar,将此文件用rar打开看看里面有没有netscape.javascript.JSObject。
2、选中project->property->java build path->libraries->add extenal jar->将上面位置的plugin.jar加入
3、project->clean重新编译。
如果仅仅是netscape没有引用的问题,至此应该解决了。
不过,NC5.7还是启动失败,根据提示接下来应当看下业务上的问题,参见:
NC57启动失败:AppletContainer.init错误
开发环境:eclipse3.8+jre1.5+win7x64
业务环境:NC5.7
问题描述:
需解NC5.7bug,拷贝了一个NC5.7标准环境下来欲debug启动客户端,eclipse的console报错如下: