A colleague installed a new application for me today and has managed to mangle my PATH and my java environments. I think I have the critical stuff back, but java build in Eclipse (via ant) does not work. I get the following error:
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:\Java\jdk\jre"
The really weird thing is that that is not what my JAV_HOME is set to!
H:\>echo %JAVA_HOME%
C:\Java\jdk
Where is the extra \jre coming from?
I have also added C:\Java\jdk\bin to my PATH variable, so javac is on the path:
H:\>javac
Usage: javac <options> <source files>
where possible options include:
The line in the build.xml which the stack trace points to is a simple javac ant command:
<javac source="${webapps.javac_target}" target="${webapps.javac_target}" debug="on" destdir="${classes}" srcdir="${src}">
The default Installed JRE has location C:\Java\jdk (and this is the one used by this project). Even the eclipse.ini ensures that Eclipse uses the same JDK with
-vm
C:\Java\jdk\bin\javaw.exe
Any ideas what I need to set to make this work again?
Installed JREspreference page as you expect, including the JRE locations? - nitind