编译错误

我的工作的Fedora,我的Java家被设定为:编译错误

export JAVA_HOME=/home/UserName/java 

export M3_HOME=/home/UserName/softwares/apache-maven-3.0.3

export PATH=$PATH:/home/UserName/java/bin:/home/Udeshika/softwares/apache-maven-3.0.3/bin

现在,当我尝试运行mvn install Maven的项目,我收到以下错误

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project viewer: Compilation failure 

[ERROR] Unable to locate the Javac Compiler in:

[ERROR] /home/UserName/java/jre/../lib/tools.jar

[ERROR] Please ensure you are using JDK 1.4 or above and

[ERROR] not a JRE (the com.sun.tools.javac.Main class is required).

[ERROR] In most cases you can change the location of your Java

[ERROR] installation by setting the JAVA_HOME environment variable.

[ERROR] -> [Help 1]

[ERROR]

如果我检查我的Maven版本

Apache Maven 3.0.3 (r1075438; 2011-02-28 23:01:09+0530) 

Maven home: /home/UserName/softwares/apache-maven-3.0.3

Java version: 1.6.0_07, vendor: Sun Microsystems Inc.

Java home: /home/UserName/java/jre

Default locale: en_US, platform encoding: UTF-8

OS name: "linux", version: "2.6.34.9-69.fc13.i686.pae", arch: "i386", family: "unix"

这里行家告诉我的JAVA_HOME是

Java主:/家庭/用户名/ JAVA/JRE

我想我现在已经确定的问题,我不知道解决这个问题任何人都可以引导我解决这个问题?

预先感谢您

回答:

您需要有一个Java SDK才能使用Maven。 SDK包含tools.jar并允许您编译,而JRE仅仅是一个运行时。

以上是 编译错误 的全部内容, 来源链接: utcz.com/qa/259826.html

回到顶部