I got error message every time I changed my pom.xml in eclipse.
Build errors for myapp; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project web: Compilation failure
Unable to locate the Javac Compiler in:
C:\Program Files (x86)\Java\jre6\..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable
I have set JAVA_HOME environment variable. It is:JAVA_HOME=D:\Java\jdk1.6.0_23
Thanks.
Eclipse has its own built-in incremental compiler so it does not need (nor use) javac from a JDK. So yes, Eclipse's Java Development Tools (JDT) will function with only a JRE.
This is the step I did to solve that problem (Eclipse 3.7 Indigo):
Window -> Preferences -> Java -> installed JREs -> I have a JRE from the JDK location, my location looks like C:\Program Files\Java\jdk1.6.0_26
Window -> Preferences -> Java -> installed JREs -> Execution Environments -> Select JavaSE-1.6 and select a compatible JDK which should be the one set in the previous step.
None of the above worked for me but when I followed the following steps, the problem went away.
Window -> Preferences -> Java -> installed JREs -> Execution Enviroments -> click the checkbox on the right side
I had this same issue which I just figured out. The Runtime JRE was specified correctly in EVERY other part of eclipse.
I use an eclipse Run Configuration...
The Run Configuration is YET ANOTHER place where the java runtime JRE is specified. If you are using a maven Run Configuration, open that up, click the JRE tab and select the proper (JDK) "Runtime JRE".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With