I had this problem when I was trying to run commands through CLI.
It was a problem with system looking at the JRE folder i.e.
D:Program FilesJavajre8in
. If we look in there, there is no Tools.jar
, hence the error.
You need to find where the JDK
is, in my case: D:Program FilesJavajdk1.8.0_11
, and if you look in the lib
directory, you will see Tools.jar
.
What I did I created a new environment variable JAVA_HOME
:
And then you need to edit your PATH variable to include JAVA_HOME, i.e. %JAVA_HOME%/bin;
Re-open command prompt and should run.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…