Netbeans 8.2 with jdk 9

16k views Asked by At

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.

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

Here is my environment:

  • OS: windows 10 (64bit)
  • JDK: JDK9 BUILD149
  • netbeans 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.

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


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 ?

2

There are 2 answers

0
SpacemanSpiff On BEST ANSWER

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

0
Wael Al Khatib On

You must update JAVA_HOME environment variable to correct path