In this post, I will show you the steps to change JDK for Apache NetBeans IDE. In other words, how to run NetBeans under different version of JDK.

You know, by default, NetBeans IDE sticks with the JDK it found at the time of installation, by storing the path to JDK home in a configuration file called netbeans.conf. You can find this file under NetBeans installation directory > netbeans > etc directory.

For example, if you install NetBeans on Windows, you can find this configuration file under this directory:

C:\Program Files\NetBeans-VERSION\netbeans\etc

Then open the netbeans.conf file using a text editor. Look for the line that looks like below:

netbeans_jdkhome="g:\JDK\OpenJDK\jdk-11.0.2"

Then update new value for this property, for example:

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

Save the file and restart NetBeans. And you’re all set. The Apache NetBeans IDE will run under the specified JDK.

So to change JDK for NetBeans, to update the netbeans_jdkhome property in the netbeans.conf file which can be found under installation directory > netbeans > etc directory.

You can watch the visual steps in the video below:



 

Other NetBeans Tutorials:

 


About the Author:

is certified Java programmer (SCJP and SCWCD). He began programming with Java back in the days of Java 1.4 and has been passionate about it ever since. You can connect with him on Facebook and watch his Java videos on YouTube.



Add comment

   


Comments 

#4domden2024-05-29 00:00
thanks!!!!!!!!!!!!!!!
Quote
#3maiku2023-04-28 17:15
thanks bro! Very helpfull!!!
Quote
#2Luiz2021-07-24 15:06
Thank you very much Nam!
Quote
#1AbdulBasir Mohammadi2021-03-04 21:46
Hello,
This is Abdul Basir Mohammadi
From B section of BCA Genral
Quote