Proper way to set JAVA_HOME variable to run PhoneGap Apps

Have you ever encounter the following error problem running your apps in phonegap: Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK You need to know the path of your Java JDK ex. C:\Program Files\Java\jdk1.7.0_51 Once you have the JDK installation path: Right-click the My Computer.[…]