創建了一個struts與spring集成的項目,運行run as—>maven install時出現以下錯誤:
*******************************************
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project ssh: Compilation failure
Unable to locate the Javac Compiler in:
D:/Program Files/MyEclipse 6.0/jre/../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.
********************************************
更加奇怪的是並不是每次運行都出現,偶爾可以運行成功,生成war包。
網上針對此問題的解決辦法大都是:
1)設置JAVA_HOME環境變量為:C:/Program Files/Java/jdk 1.6.0/lib/tools.jar
2)在MyEclipse中設置:
<1>Java -> Build Path -> Classpath Variables ->
JAVA_HOME
C:/Program Files/Java/jdk 1.6.0/lib/tools.jar
<2>Activate only (or add) module
Java -> Installed JREs ->
jdk 1.6.0
C:/Program Files/Java/jdk 1.6.0
我都嘗試做了修改,但是沒有絲毫的效果,希望高手們不吝賜教,指點一二,不勝感激!
后記:
D:/Development/Java/jdk1.5.0_16/bin/javaw.exe
版權聲明:本文為博主原創文章,未經博主允許不得轉載。
