Java 错误:无法使用 JDK 8 启动 NetBeans 7.3
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22944588/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Bug: Can not start NetBeans 7.3 with JDK 8
提问by Vishrant
I have NetBeans 7.3
and I upgraded my JDK to 1.8
. Now I tried to open NetBeans and was getting Loading Cached Objects
message on its loading window and then NetBeans got terminated.
我已经NetBeans 7.3
将我的 JDK 升级到1.8
. 现在我尝试打开 NetBeans 并Loading Cached Objects
在其加载窗口上收到消息,然后 NetBeans 被终止。
I was getting following exception (available in \var\log\messages.log file):
我收到以下异常(在 \var\log\messages.log 文件中可用):
java.lang.IllegalAccessException: Class org.openide.util.WeakListenerImpl$ProxyListener can not access a member of class org.openide.filesystems.$Proxy0 with modifiers "public"
java.lang.IllegalAccessException: Class org.openide.util.WeakListenerImpl$ProxyListener can not access a member of class org.openide.filesystems.$Proxy0 with modifiers "public"
What is the probable reason?
可能的原因是什么?
采纳答案by Vishrant
Its a bug in NetBeans 7.3 and the details of this can be found here.
它是 NetBeans 7.3 中的一个错误,可以在此处找到详细信息。
JDK 8 works with Netbeans 8+.
JDK 8 适用于Netbeans 8+。
If you wish to continue using Netbeans 7.x with older version of Java revert JDK location in netbeans using following steps:
如果您希望继续使用带有旧版 Java 的 Netbeans 7.x,请使用以下步骤在 netbeans 中恢复 JDK 位置:
- Go to NetBeans installation inside you will find
/etc
folder - Open
netbeans.conf
file of etc folder - Change the path to earlier jdk version which is specified against
netbeans_jdkhome
property. Now open your NetBeans it will work.
- 转到 NetBeans 安装里面,你会发现
/etc
文件夹 - 打开
netbeans.conf
etc文件夹的文件 - 将路径更改为针对
netbeans_jdkhome
属性指定的较早 jdk 版本。现在打开您的 NetBeans,它将起作用。