java - Setting up dev env for Cordova on Windows: ant does not recognize JAVA_HOME -
i have been trying set cordova on windows 7 machine. after hours of troubleshooting believe have narrowed problem down configuration of ant, i'm @ loss how fix it.
when executing cordova build
prompt, under -compile:
get:
build failed c:\path\to\ant\build.xml:601: following error occurred while executing line: c:\path\to\ant\build.xml:720: following error occurred while executing line: c:\path\to\ant\build.xml:734: unable find javac compiler; com.sun.tools.javac.main not on classpath. perhaps java_home_ not point jdk. set "c:\program files(x86)\java\jre1.8.0_20"
now frustrating part in environment variables java_home point jdk , not jre. when run set java_home
get:
java_home=c:\program files(x86)\java\jdk1.8.0_20
when run echo %java_home%
get:
c:\program files(x86)\java\jdk1.8.0_20
here of 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 try?
thank you, casey
its misconfigured environmental variable. error message indicates ant trying use jre.
go system properties > environment variables
, make sure there system variable java_home
set c:\program files(x86)\java\jdk1.8.0_20
. verify that folder jdk installed. open new command prompt , type echo %java_home%
verify.
Comments
Post a Comment