How can I set the JDK NetBeans runs on?

Thanks to Kasun Gajasinghe’s tip, I found the solution in the “suggested” link. Update the following file (replace 7.x with your NetBeans version):

C:\Program Files\NetBeans 7.x\etc\netbeans.conf

Change the following line to point it where your Java installation is:

netbeans_jdkhome="C:\Program Files\Java\jdk1.7xxxxx"

You may need administrator privileges to edit netbeans.conf.

Leave a Comment