How to change the Java distribution in Netbeans

How to change the Java distribution in Netbeans

When installing Netbeans it will ask for a distribution of the Java SDK. Netbeans doesn't work well with version 7.

When installing Netbeans it will ask for a distribution of the Java SDK. Netbeans doesn't work well with version 7. In fact you might even receive an error once in a while when installing Netbeans with this distribution.

It works well however when you have installed it with version 6 of the Java SDK.

How to change Java distribution after installation of Netbeans

  • Go to the directory (if you are on Windows): c:\program files\Netbeans\x.x.etc

  • Open netbeans.conf in your editor

  • Go find the line: 

    netbeans\_jdkhome="C:\Program Files\Java\jre7"
  • Alter this line in:

    netbeans\_jdkhome="C:\Program Files\Java\jdk1.6.0\_23
  • Save the file

  • Start Netbeans and it should be done.

Use your own Java versions instead of the samples for your own situation.

More from same category