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:
Nam Ha Minh 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.