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.
- select Properties.
- Click the Advanced tab
- Go to Environment Variables button. Under System Variables, click New.
- Enter the variable name as JAVA_HOME.
- Enter the variable value as the installation path for the Java Development Kit.
- Click OK.
- Click Apply Changes.
If still not working, you might need to restart your computer.