On windows, my JDK is installed at C:\Program Files\Java\jdk1.8.0_65.
JAVA_HOME is set to that directory.
From the code at we can see that 'locateToolsJar()' is searching in the wrong library.
Instead of searching in 'return new File(home,"../lib/tools.jar");' it should be 'return new File(home,"/lib/tools.jar");'
On windows, my JDK is installed at C:\Program Files\Java\jdk1.8.0_65. JAVA_HOME is set to that directory.
From the code at we can see that 'locateToolsJar()' is searching in the wrong library. Instead of searching in 'return new File(home,"../lib/tools.jar");' it should be 'return new File(home,"/lib/tools.jar");'
From 'https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html' we can see that java.home is 'Installation directory for Java Runtime Environment (JRE)' and not JDK