How to install NetBeans 9 for JDK 9 development

NetBeans 8.2 IDE is not compatible with JDK 9. The version of NetBeans 8.2 is not designed to work with JDK 9 and does not support development on the ninth version of Java.

To successfully use JDK 9, you need to download the NetBeans 9.0 development build from Apache Incubator.

How to install NetBeans 9 in Windows

Although the https://builds.apache.org/job/incubator-netbeans-linux/ page says that there is a version for Linux and contains a link to the version for Windows, you need to download the archive from this page, i.e. you need to download a version for Linux even if you are going to run NetBeans 9 in Windows.

The download archive is called something like "NetBeans-dev-incubator-netbeans-linux-264-on-20171209-basic.zip".

NetBeans, like any Java application, is a portable program. To start, you need to unzip the downloaded archive. Then go to the netbeans\etc\ folder and open the netbeans.conf file with a text editor. In this file, find the line

#netbeans_jdkhome = "/path/to/jdk"

Uncomment this line (remove the # character) and specify the full path to jdk, like this:

netbeans_jdkhome="C:\Program Files\Java\jdk-9.0.1\"

Save and close this file.

Go to the netbeans\bin\ folder, where you will see the files:

  • netbeans.exe
  • netbeans64.exe

On 64-bit systems, run netbeans64.exe:

The simplest program that shows the current version of the Java runtime:

How to install NetBeans 9 in Linux

Go to https://builds.apache.org/job/incubator-netbeans-linux/ and download the archive, which is called something like this: "NetBeans-dev-incubator-netbeans-linux-264-on-20171209-basic.zip".

Unzip the downloaded archive. Then go to the netbeans/etc/ directory and open the netbeans.conf file with a text editor. In this file, find the line

#netbeans_jdkhome="/path/to/jdk" 

Uncomment this line (remove the # character) and specify the full path to jdk. If you used this manual to install Java 9 (JDK 9, JRE 9) on Linux, then the line should look like this:

netbeans_jdkhome="/opt/java/jdk-9/"

Save and close this file.

Go to the netbeans/bin/ folder, where you will see the netbeans file.

To launch NetBeans, click on it twice.

Select Start in Terminal or Start.

Conclusion

At present, NetBeans 9 is in the active development stage.

NetBeans 9 can work with both JDK 9 and JDK 8.

If you are interested in other NetBeans features, such as development in PHP, JavaScript, HTML, etc., you should install additional plug-ins to add functionality.

You can run NetBeans on JDK 8 and then register JDK 9 as a Java platform, after which you can make use of new JDK 9 features such as Jigsaw. Even better, you can run NetBeans on JDK 9, which means that you’ll be able to use JShell directly inside NetBeans.

Recommended for you:

4 Comments to How to install NetBeans 9 for JDK 9 development

  1. Volodymyr says:

    Thank you very much. BTW: Nobody and nowhere is pointing out that NetBeans 9 + JDK 9 resolves High DPI scaling issues on WIndows 10. So glad I found this article.

  2. CalvinHobbes says:

    Hello and thank you very much! I was fighting for hours, but after I read your explenation it took me only 20 minutes more 🙂 

  3. Laurent koko says:

    thank you very much, was stucked for days until I found this articles

  4. vaibhav says:

    thanks,it even works for jdk 10

Leave a Reply to Volodymyr Cancel reply

Your email address will not be published. Required fields are marked *