0

I've searched thoroughly the Internet and haven't yet found the answer to my problem. I've environment variables set up properly, that is:

  • JAVA_HOME is pointing to D:\Dependencies\jdk-7u80--x64
  • PATH has %JAVA_HOME%\bin as the location to look for files

The error return message states clearly:

D:\Dependencies\android-sdk_r24.3.4-windows\android-sdk-windows\tools\ant\build. xml:716: The following error occurred while executing this line:

D:\Dependencies\android-sdk_r24.3.4-windows\android-sdk-windows\tools\ant\build. xml:730: 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.

It is currently set to "D:\Dependencies\jdk-7u80--x64"


I have already tried every single combination of both vriables, yet cannot get the project to build on 'ant debug'. That is: a simple phonegap project.

I AM NOT RUNNING ECLIPSE. I AM RUNNING IT VIA CMD on Win7.

echoing these variables in cmd returns them correctly (that is, as they should work)

Variables are system-level, not user-level

  • It might be a good idea to paste your *entire* PATH into the question – JonK Oct 14 '15 at 13:01
  • There you go: C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;%ADB_HOME%;%ANT_HOME%\bin;%JDK_HOME%\bin;%ANDROID_HOME%;%CSCRIPT_PATH%;%JAVA_HOME%\bin; – Grzesiek Surdziel Oct 14 '15 at 13:12
  • Shot in the dark: try `set` in cmd and check pathes. Maybe you need a 32 bit jdk? Put %JAVA_HOME% at the beginning of the PATH variable. – opfau Oct 14 '15 at 13:14
  • Is JAVA_HOME a user variable or a system level environment variable? – Dragos.Cojocari Oct 14 '15 at 13:17
  • 1
    Keep in mind that in order for environment variables to take affect you need to open a new command window. So if you have a cmd window open and make a change, it will not be reflected in your currently open session. –  Oct 14 '15 at 13:20
  • You might find some info here: http://stackoverflow.com/questions/949678/ant-is-using-wrong-java-version . Also make sure to check what version ant is pointed to by running ant -v –  Oct 14 '15 at 13:24
  • @up: java is of correct version – Grzesiek Surdziel Oct 14 '15 at 13:25

0 Answers0