[英]maven install in eclipse jre error :
當我從eclipse運行maven install時,出現以下錯誤。 我在安裝的JRE中有JRE6
窗口-首選項-Java-已安裝的JRE
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile)
.....
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Unable to locate the Javac Compiler in:
C:\Program Files\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.
我已經在環境變量-C:\\ Program Files \\ Java \\ jdk1.6.0_45中正確設置了JAVA_HOME,並且在命令提示符下執行java -version時可以看到相同的內容
如錯誤所示,它無法找到Javac編譯器。 JRE沒有編譯器。 您需要JDK。
在“窗口”“慣用選項”“ Java”“已安裝的JRE”中,添加您的JDK / jre。
說C:\\ Program Files \\ Java \\ jdk1.6.0_45 \\ jre
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.