Netbeans is an IDE developed in Java and JDK. JDK installation is required to run Netbeans.
By default, NetBeans comes with the default JDK version.
Sometimes, You want to change the default java version.
This post covers how to change the java version in the NetBeans platform.
Netbeans change platform java version
There are multiple ways to change the JDK version.
- using NetBeans configuration
Netbeans installation comes with netbeans.conf file with default settings.
This file is located in installation-folder/etc/netbeans.conf.
- Open the file in a text editor and change the
netbeans_jdkhomevalue to the JDK path as given below.
These changes are permanent and persistent for multiple restarts of the NetBeans platform.
once you made changes, please restart the server to reload the changes.
using command line
Another way using the command line parameter
nebeans.eec --jdkhome A:\Java\jdk-188.8.131.52
This overrides the JDK path configured in netbeans.conf.
- Use UI Tools
This is another way to change the JDK version in IDE.
Open Netbeans IDE
Go to the Tools menu
Select the Java platform option
It opens the popup window
Add Platformbutton, It opens the “Add Java Platform” window
you can choose one of the platform types as given below
- Java Standard Edition
- Remote Java Standard Edition
- Download OpenJDK
and follow the next steps to finish.