我最近单击了我的 Nebeans 7.1 安装的通知窗口以自动安装更新。从那以后,我不再能够调试我的项目。项目运行没有问题,但如果我尝试启动调试器,构建会失败并显示以下错误消息:
The following error occurred while executing this line:
C:\Users\handy\Documents\NetBeansProjects\heatmap\nbproject\build-impl.xml:814:
java.lang.NoClassDefFoundError: com/sun/jdi/Bootstrap
at org.netbeans.api.debugger.jpda.AttachingDICookie.findAttachingConnector(AttachingDICookie.java:250)
at org.netbeans.api.debugger.jpda.AttachingDICookie.create(AttachingDICookie.java:123)
at org.netbeans.api.debugger.jpda.JPDADebugger.attach(JPDADebugger.java:280)
at org.netbeans.modules.debugger.jpda.ant.JPDAConnect$1.run(JPDAConnect.java:228)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1411)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1991)
Caused by: java.lang.ClassNotFoundException: com.sun.jdi.Bootstrap starting from ModuleCL@5490fb5b[org.netbeans.api.debugger.jpda] with possible defining loaders null and declared parents [ModuleCL@21d96c05[org.openide.loaders], ModuleCL@1ef62a93[org.netbeans.api.debugger], ModuleCL@33600595[org.netbeans.modules.projectapi], ModuleCL@2df2888[org.openide.nodes], org.netbeans.MainImpl$BootClassLoader@7e628e42, ModuleCL@6bcea26e[org.netbeans.modules.parsing.api], ModuleCL@3e473e54[org.netbeans.modules.java.source], ModuleCL@3636417f[org.netbeans.api.java.classpath], ModuleCL@b1364f5[org.netbeans.spi.viewmodel]]
at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:264)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 6 more
Caused by: java.lang.ClassNotFoundException: com.sun.jdi.Bootstrap
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:262)
... 7 more
BUILD FAILED (total time: 56 seconds)
build-impl.xml中引用的行如下:
<nbjpdaconnect address="${jpda.address}" host="${jpda.host}"
name="${name}" transport="${jpda.transport}">
似乎无法连接调试器。Netbeans 论坛中的一篇帖子指出将 JAXB 更新到 2.0 版可能是原因。提出了一些变通办法。
有没有真正的解决方案而不是解决方法?我可以回滚 Netbeans 中的某些更新吗?
删除user-home/.netbeans/7.1文件夹没有帮助。
系统信息:Netbeans 7.1、JDK 7、Windows 7