java 带有 jdk 9 的 Netbeans 8.2

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/41230488/
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-11-03 05:45:21  来源:igfitidea点击:

Netbeans 8.2 with jdk 9

javanetbeansjava-9hdpi

提问by brandboat

I have an issue on hdpi with netbeans, the icon become too small when I open it. Then I found the issue below. And someone says that jdk9 fix the resolution problem.

我在使用 netbeans 的 hdpi 上遇到问题,打开它时图标变得太小。然后我发现了下面的问题。有人说 jdk9 解决了分辨率问题。

https://netbeans.org/bugzilla/show_bug.cgi?id=252452

https://netbeans.org/bugzilla/show_bug.cgi?id=252452

Here is my environment:

这是我的环境:

  • OS: windows 10 (64bit)
  • JDK: JDK9 BUILD149
  • netbeans 8.2
  • 操作系统:Windows 10(64位)
  • JDK:JDK9 BUILD149
  • 网豆 8.2

I downloaded jdk9 & netbeans8.2 on windows10, hoping that JDK9 might fix the annoying resoution issue. Unfortunately, I can't open the netbeans.

我在windows10上下载了jdk9 & netbeans8.2,希望JDK9可以解决烦人的解析问题。不幸的是,我无法打开netbeans。

After I type this in cmd. netbeans.exe --jdkhome "C:\Program Files\Java\jdk-9"console show the error.

在我在 cmd 中输入这个之后。 netbeans.exe --jdkhome "C:\Program Files\Java\jdk-9"控制台显示错误。


No way to find original stream handler for jar protocol
java.lang.reflect.InaccessibleObjectException: Unable to make field transient java.net.URLStreamHandler java.net.URL.handler accessible: module java.base does not "opens java.net" to unnamed module @4973813a
        at java.base/jdk.internal.reflect.Reflection.throwInaccessibleObjectException(Reflection.java:427)
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:201)
        at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:171)
        at java.base/java.lang.reflect.Field.setAccessible(Field.java:165)
        at org.netbeans.ProxyURLStreamHandlerFactory.register(ProxyURLStreamHandlerFactory.java:82)
        at org.netbeans.JarClassLoader.(JarClassLoader.java:141)
        at org.netbeans.MainImpl.execute(MainImpl.java:178)
        at org.netbeans.MainImpl.main(MainImpl.java:85)
        at org.netbeans.Main.main(Main.java:83)

Does anyone know how to use jdk9 with Netbeans ?

有谁知道如何在 Netbeans 中使用 jdk9?

采纳答案by SpacemanSpiff

As you noted yourself in a comment you need to use one of the nightly builds to get JDK 9 support. The full instructions are available here: http://wiki.netbeans.org/JDK9Support

正如您在评论中指出的那样,您需要使用每晚构建之一来获得 JDK 9 支持。完整说明可在此处获得:http: //wiki.netbeans.org/JDK9Support

回答by Wael Al Khatib

You must update JAVA_HOME environment variable to correct path

您必须更新 JAVA_HOME 环境变量以正确路径