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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 19:30:16  来源:igfitidea点击:

Bug: Can not start NetBeans 7.3 with JDK 8

javanetbeans

提问by Vishrant

I have NetBeans 7.3and I upgraded my JDK to 1.8. Now I tried to open NetBeans and was getting Loading Cached Objectsmessage 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 /etcfolder
  • Open netbeans.conffile of etc folder
  • Change the path to earlier jdk version which is specified against netbeans_jdkhomeproperty. Now open your NetBeans it will work.
  • 转到 NetBeans 安装里面,你会发现/etc文件夹
  • 打开netbeans.confetc文件夹的文件
  • 将路径更改为针对netbeans_jdkhome属性指定的较早 jdk 版本。现在打开您的 NetBeans,它将起作用。