build errors for spider; Org.apache.maven.lifecycle.LifecycleExecutionException:Failed to execute goal org.apache.maven.plugins: Maven-compiler-plugin:2.3.2:compile (Default-compile) on project spider:compilation failure
Unable to locate the Javac Compiler in:
C:\Program files\java\jre6\. \lib\tools.jar
Please ensure your are using JDK 1.4 or above and
Not a JRE (the Com.sun.tools.javac.Main class is required).
In most cases/can change the location of your Java
Installation by setting the JAVA_HOME environment variable.
In fact, before the environment has encountered this problem, but eclipse or maven in the JRE environment when the choice of errors, the general solution is to replace the default JRE in eclipse with the JDK JRE
The method is as follows: Window-->preferences-->java-->installed JREs
Here you will see that there is a default, and then you click Add on the right ... to add a new standard VM,JRE home Select the JRE directory below your JDK, and when you're done, set him as the default. Then, you click on the installed JREs menu, there is a execution environments, the javase you use to set up.
The other solution is to add two lines to the Eclipse startup configuration file.
-vm
C:\Program Files\java\jdk1.6.0_45\bin\javaw.exe
There are two lines to write and one to write before the-vmargs.
In some cases, the reason for the problem is the coding problem, set up coding, Engineering coding, Java file encoding, etc...
Just yesterday when I encountered this problem, these methods have tried, but still error, MAVEN project can not compile. Then I check the environment variable configuration problem, found that there are no errors, input java-version, mvn-version, can display the normal version information. But when I delete the java_home, I enter the java-version, or display the normal version information, this is wrong, but I did not set the Java PATH environment variable AH. But all the Java and MAVEN environment variables are deleted, reconfigured again, and sure enough to open the Eclipse compiler project, running normally.