If a JDK is uninstalled and another version of it is reinstalled due to some reason, NetBeans does not update the default JDK on its own. To change the default JDK
1. Go to installation directory of Netbeans. eg C:\Program Files\NetBeans 7.0\etc
2. In the etc folder, open netbeans.conf with wordpad of Vim editor.
3. Locate the line which says
# Default location of JDK, can be overridden by using --jdkhome <dir>:
netbeans_jdkhome="C:\Program Files\Java\jdk1.7.0_01"
4. change the value of netbeans_jdkhome to give the path where the new version of JDK is installed.
1. Go to installation directory of Netbeans. eg C:\Program Files\NetBeans 7.0\etc
2. In the etc folder, open netbeans.conf with wordpad of Vim editor.
3. Locate the line which says
# Default location of JDK, can be overridden by using --jdkhome <dir>:
netbeans_jdkhome="C:\Program Files\Java\jdk1.7.0_01"
4. change the value of netbeans_jdkhome to give the path where the new version of JDK is installed.