I have been trying to set up Cordova on my Windows 7 machine. After hours of troubleshooting I believe I have narrowed the problem down to the configuration of ant, but I'm at a loss as to how to fix it.
When executing cordova build
from the prompt, under -compile:
I get:
BUILD FAILED
C:\path\to\ant\build.xml:601: The following error occurred while executing this line:
C:\path\to\ant\build.xml:720: The following error occurred while executing this line:
C:\path\to\ant\build.xml:734: Unable to find javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME_ does not point to the JDK.
It is currently set to "C:\Program Files(x86)\Java\jre1.8.0_20"
Now the frustrating part is that in my environment variables JAVA_HOME does point to the JDK and not the JRE. When I run set JAVA_HOME
I get:
JAVA_HOME=C:\Program Files(x86)\Java\jdk1.8.0_20
When I run echo %JAVA_HOME%
I get:
C:\Program Files(x86)\Java\jdk1.8.0_20
Here are all of my relevant environment variables (I think):
ANT_HOME: C:\ant
JAVA_HOME: C:\Program Files(x86)\Java\jdk1.8.0_20
PATH: C:\Program Files (x86)\nodejs\;C:\Program Files (x86)\Git\bin;C:\Development\adt-bundle\sdk\platform-tools;C:\Development\adt-bundle\sdk\tools;C:\Program Files (x86)\Java\jre1.8.0_20\bin;C:\Program Files(x86)\Java\jdk1.8.0_20\bin;C:\Users\Casey Ydenberg\AppData\Roaming\npm;C:\ant\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
Any suggestions as to what to try?
Thank you, Casey
echo %JAVA_HOME%
from the command line. What does it output? - kindasimpleC:\Program Files(x86)\Java\jdk1.8.0_20
. - caseyy