在以下位置找不到Javac编译器:
我已经按照下面的指导安装了OpenJDK。但我还是不断地犯这个错误。我在bash_profile中设置了正确的路径 有人能帮我解决这个问题吗在以下位置找不到Javac编译器:,java,linux,centos,openjdk,Java,Linux,Centos,Openjdk,我已经按照下面的指导安装了OpenJDK。但我还是不断地犯这个错误。我在bash_profile中设置了正确的路径 有人能帮我解决这个问题吗 [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
[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
有人能帮我吗?对此不太确定,但就我而言,我是这样设置的:
export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_11/
export PATH=$JAVA_HOME/bin:$PATH
我在bash.bashrc
在提供变量名称之前,请尝试添加导出
。我发现的另一件事是,tool.jar
不在jre
目录下,而是在jdk
目录下
希望这能有所帮助。对此不太确定,但就我而言,我已将其设置为:
export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_11/
export PATH=$JAVA_HOME/bin:$PATH
我在bash.bashrc
在提供变量名称之前,请尝试添加导出
。我发现的另一件事是,tool.jar
不在jre
目录下,而是在jdk
目录下
希望这能有所帮助。您已经安装了Java运行时,但是要开发Java应用程序,您需要JDK,因此您必须安装OpenJDK-devel包,在您的例子中
Java-1.6.0-OpenJDK-devel-1.6.0.0.x86_64
您已经安装了Java运行时,但是要开发Java应用程序,您需要JDK,因此您必须安装OpenJDK-devel包,在您的情况下java-1.6.0-openjdk-devel-1.6.0.x86_64
您需要安装java-1.6.0-openjdk-devel安装java-1.6.0-openjdk只安装JRE。您需要安装java-1.6.0-openjdk-devel安装java-1.6.0-openjdk只安装JRE。您是否~/.bash_profile
?我已经按照下面的指导安装了OpenJDK。不,你没有提到你是如何安装的。是的,sudo。仍然不断地得到错误。m0skito,我已经安装了openjdk,作为这里的导师java-1.6.0-openjdk-1.6.0.0.x86_64/是否有/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/lib/tools.jar
?不,gliptak。我也试着去寻找它,但运气不好。“查找:`tools.jar':没有这样的文件或目录”-怎么办?你有source~/.bash_profile
?我已经按照下面的指导安装了OpenJDK,不,你没有提到你是如何安装的。是的,我有,sudo。仍然不断地得到错误。m0skito,我已经安装了openjdk,作为这里的导师java-1.6.0-openjdk-1.6.0.0.x86_64/是否有/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/lib/tools.jar
?不,gliptak。我也试着去寻找它,但运气不好。“查找:`tools.jar':没有这样的文件或目录”-怎么办?