0

I am getting this error in Eclipse.

C:\Users\Iti\eclipse-workspace\Iti\src\build.xml:17: 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:\Users\Iti\AppData\Local\Temp\eoiEA75.tmp\plugins\org.eclipse.justj.openjdk.hotspot.jre.minimal.stripped.win32.x86_64_14.0.2.v20200815-0932\jre"

I have set JAVA_HOME to C:\Program Files\Java\jdk-15.0.1 in the system environment variables.

  • does this help? https://stackoverflow.com/questions/9930181/ant-build-not-working-unable-to-find-a-javac-compiler – MNEMO Nov 25 '20 at 06:00
  • No, I have already tried this. – ITI SINGH Nov 25 '20 at 06:04
  • Good, and could you show us how much you have done your search and what you have tried already? It will help us answering. – MNEMO Nov 25 '20 at 06:08
  • try pointing to bin folder in the java installation folder. – Eldhose Abraham Nov 25 '20 at 06:10
  • 1
    I have tried everything given in the following links : https://stackoverflow.com/questions/15098258/ant-java-home-does-not-point-to-the-jdk-but-it-does https://stackoverflow.com/questions/1288343/how-to-change-java-home-for-eclipse-ant https://stackoverflow.com/questions/9930181/ant-build-not-working-unable-to-find-a-javac-compiler https://stackoverflow.com/questions/8400637/unable-to-find-a-javac-compiler/20869279 – ITI SINGH Nov 25 '20 at 06:14
  • also tried adding the bin folder in the path – ITI SINGH Nov 25 '20 at 06:15
  • There are two things 1. define `JAVA_HOME` variable(which points to jdk root folder) 2. add `JAVA_HOME/bin` to `PATH` environment variable – dkb Nov 25 '20 at 06:46

0 Answers0