There are two directories that looks like JDK.
C:\Program Files\Java\jdk1.7.0_02
C:\Program Files (x86)\Java\jdk1.7.0_02\
This may be due to both 64 bit and 32 bit JDK installed? What ever may be the case, the java.exe
seen by ant.bat should from the JDK. If the JRE's java.exe
comes first in the path, that will be used to guess the JDK location.
Put 'C:\Program Files (x86)\Java\jdk1.7.0_02\bin' or 'C:\Program Files\Java\jdk1.7.0_02' as the first argument in the path.
Further steps:
You can take output of ant -diagnostics
and look for interesting keys. (assuming Sun/Oracle JDK).
java.class.path
java.library.path
sun.boot.library.path
(in my case tools.jar appears in java.class.path)