2017-06-17 24 views
-3
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project wovv-target: Compilation failure 
Unable to locate the Javac Compiler in: 
C:\Program Files\Java\jdk1.8.0_131\..\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. 
-> [Help 1] 

To see the full stack trace of the errors, re-run Maven with the -e switch. 
Re-run Maven using the -X switch to enable full debug logging. 

For more information about the errors and possible solutions, please read the following articles: 
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException 
+0

好像你沒有':如果您使用CMD標準雙贏控制檯替換$到%喜歡

echo %JAVA_HOME% 

也使NetBeans的使用你的系統中安裝了行家喜歡這個我使用bash javac'安裝。你有沒有試過安裝它? – Mureinik

+0

請閱讀此[如何問](http://stackoverflow.com/help/how-to-ask)以改善您的問題與足夠的具體信息來描述您的問題。 – thewaywewere

回答

0

的Maven試圖尋找錯誤的目錄javac的,首先檢查你的JAVA_HOME系統變量。我建議在系統上安裝maven並配置NetBeans,以使用它,而不是捆綁maven。

echo $JAVA_HOME 
C:\Progra~1\Java\jdk1.8.0_131 

,辦理入住手續Maven安裝後-v命令

mvn -v 
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T22:39:06+03:00) 
Maven home: C:\Program Files\apache-maven-3.5.0 
Java version: 1.8.0_131, vendor: Oracle Corporation 
Java home: C:\Progra~1\Java\jdk1.8.0_131\jre 
Default locale: ru_RU, platform encoding: Cp1251 
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows" 

PS MVN。

enter image description here

相關問題