Due to a vunerability of Java 7 it is highly recommended to update to Java 7u11.

If you’re going to start NetBeans after installing this JDK and installing the previous versions, NetBeans might alert that it doesn’t find this JDK. You may avoid problems by editing netbeans.conf in the NetBeans/etc folder.

Simply replace the JDK home (make sure to have rights to write to this file)

netbeans_jdkhome="C:\Program Files\Java\jdk1.7.0_11"