gpt4 book ai didi

linux - 无法在 : 中找到 Javac 编译器

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:40:02 24 4
gpt4 key购买 nike

我已经按照下面的指导安装了 OpenJDK。但我仍然不断收到此错误。我在 bash_profile 中设置了正确的 PATH。

有人可以帮我解决这个问题吗?

 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-     plugin:2.3.2:compile (default-compile) on project poker-protocol: Compilation failure
[ERROR] Unable to locate the Javac Compiler in:
[ERROR] /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/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]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :poker-protocol

在我的 bash_profile 中我有这个:

 JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre
export M2_HOME=/usr/local/apache-maven-3.0.4
export PATH=${M2_HOME}/bin:${PATH}:$JAVA_HOME/bin

有人可以帮帮我吗?

最佳答案

您已经安装了 Java 运行时,但是要开发 Java 应用程序您需要 JDK,因此您必须安装 OpenJDK 开发包,在您的情况下 java-1.6.0-openjdk-devel-1.6.0.0.x86_64

关于linux - 无法在 : 中找到 Javac 编译器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14459089/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com