简体   繁体   English

Ubuntu Java JDK工件丢失

[英]Ubuntu Java JDK artifact is missing

Using Ubuntu 16.10 and JDK 1.8.0 I'm getting this while a maven build (3.3.9): 使用Ubuntu 16.10和JDK 1.8.0时,我正在进行Maven构建(3.3.9):

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check (check) on project parent: Execution check of goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check failed: Plugin org.apache.maven.plugins:maven-checkstyle-plugin:2.17 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:1.8.0 at specified path /usr/lib/jvm/java-8-openjdk-amd64/jre/../lib/tools.jar -> [Help 1]

JAVA_HOME is set to this path. JAVA_HOME设置为此路径。 What might cause that? 是什么原因造成的?

Since you are using OpenJdk instead of OracleJDK you have different JVM enviroment, thus com.sun packages may not be available in your system. 由于您使用的是OpenJdk而不是OracleJDK,因此您具有不同的JVM环境,因此com.sun软件包可能在您的系统中不可用。

You may verify this by trying to build project on system with OracleJdk. 您可以通过尝试使用OracleJdk在系统上构建项目来验证这一点。

Maybe this caused by environement variable, try this: 也许这是由环境变量引起的,请尝试以下操作:

export JAVA_HOME =/~.../dirictoryOfYourJDK
export M2_HOME =/~.../dirictoryOfYourMaven
export PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin

i hope that help you 希望对您有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM