I had this problem when I tried to run commands through the CLI.
This was a problem with the system considering the JRE folder, i.e. D:\Program Files\Java\jre8\bin . If we look, there is no Tools.jar , hence the error.
You need to find where the JDK , in my case: D:\Program Files\Java\jdk1.8.0_11 , and if you look in the lib directory, you will see Tools.jar .
What I did, I created a new JAVA_HOME environment variable: 
And then you need to change your PATH variable to enable JAVA_HOME, i.e. %JAVA_HOME%/bin; 
Open a command prompt and execute it.
benscabbia Feb 25 '16 at 9:25 2016-02-25 09:25
source share