java - Unable to locate tools.jar by ant command JAVA_HOME and PATH is set for jdk instead jre -


i using windows 7 java installed in program files , program files (x86). getting such error "unable locate tools.jar. expected find in c:\program files\java\jre7\lib\tools.jar

  have set path variable `c:\program files\java\jdk1.7.0_51;`  java_home `c:\program files\java\jdk1.7.0_51;` 

but tried ant -diagnostics command java.home c:\programe files\java\jre7\

i had same issue.

echo %java_home%:

c:\program files\java\jdk1.8.0_51

but ant -diagnostics indicated:

java.home : c:\program files\java\jre1.8.0_60

the problem java_home environment variable pointing invalid directory.

in case, c:\program files\java\jdk1.7.0_51 not exist, ant goes looking folder , guess pulls jre folder first.

the problem c:\program files\java\jdk1.7.0_51 not exist, , ant resets java.home variable first java directory finds:

c:\programe files\java\jre7\

in case, had both of these , still did not find correct one:

c:\program files\java\jdk1.8.0_60

c:\program files\java\jre1.8.0_60

you had updated more version of jdk,

c:\program files\java\jdk1.7.0_79


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -