JAVA_HOME
does not point to the JDK.(Spring Tool Suite)
I am getting an error while running Spring Tool Suite(3.9.5.RELEASE) as
org.apache.tools.ant.BuildException: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Program Files\Java\jre1.8.0_181"
As i already set the java path in Environmental Variable-->System variables as
Variable Name : JAVA_HOME
and
Variable Value : C:\Program Files\Java\jdk1.8.0_131
and in Environmental Variable-->user variables as
Variable Name : path
and
Variable Value : C:\Program Files\Java\jdk1.8.0_131
and in my C:\Program Files\Java\ drive there is jdk1.8.0_131 and jre1.8.0_181.
I set the path
properly to JDK, also I restarted the application too, even restarted the Computer too, still I am getting the same error again.
Is there any other solution to avoid such error?