Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 检测到的JDK版本:11.0.8不在允许的范围[1.8.0-101,1.8.9999]_Java_Maven_Ubuntu_Fiji - Fatal编程技术网

Java 检测到的JDK版本:11.0.8不在允许的范围[1.8.0-101,1.8.9999]

Java 检测到的JDK版本:11.0.8不在允许的范围[1.8.0-101,1.8.9999],java,maven,ubuntu,fiji,Java,Maven,Ubuntu,Fiji,我正在尝试从斐济软件的源代码构建斐济软件。以下是github页面: 我从ubuntu的终端开始使用maven构建项目,我遇到了这个错误: ali@ali-All-Series:~/Downloads/fiji-master$ mvn WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.c

我正在尝试从斐济软件的源代码构建斐济软件。以下是github页面: 我从ubuntu的终端开始使用maven构建项目,我遇到了这个错误:

ali@ali-All-Series:~/Downloads/fiji-master$ mvn WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [INFO] Scanning for projects... [INFO] [INFO] ----------------------------< sc.fiji:fiji >---------------------------- [INFO] Building Fiji 2.1.2-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-rules) @ fiji --- [INFO] Adding ignore: module-info [INFO] Adding ignore: META-INF/versions/*/module-info [INFO] Adding ignore: com.esotericsoftware.kryo.* [INFO] Adding ignore: com.esotericsoftware.minlog.* [INFO] Adding ignore: com.esotericsoftware.reflectasm.* [INFO] Adding ignore: com.google.inject.* [INFO] Adding ignore: jnr.ffi.* [INFO] Adding ignore: org.apache.hadoop.yarn.*.package-info [INFO] Adding ignore: org.apache.spark.unused.UnusedStubClass [INFO] Adding ignore: org.hibernate.stat.ConcurrentStatisticsImpl [INFO] Adding ignore: org.jetbrains.kotlin.daemon.common.* [INFO] Adding ignore: org.junit.runner.Runner [INFO] Adding ignore: module-info [INFO] Adding ignore: module-info [WARNING] Rule 2: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message: Detected JDK Version: 11.0.8 is not in the allowed range [1.8.0-101,1.8.9999]. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 22.131 s [INFO] Finished at: 2020-08-23T23:01:01+04:30 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.4.1:enforce (enforce-rules) on project fiji: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [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/MojoExecutionException ali@ali-All-Series:~/Downloads/fiji-master$ ali@ali-所有系列:~/Downloads/fiji master$mvn 警告:发生了非法的反射访问操作 警告:com.google.inject.internal.cglib.core.$reflecturatils$1(文件:/usr/share/maven/lib/guice.jar)对方法java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)的非法反射访问 警告:请考虑将此报告给COM。谷歌。 警告:使用--invalize access=warn以启用对进一步非法访问操作的警告 警告:所有非法访问操作将在未来版本中被拒绝 [信息]正在扫描项目。。。 [信息] [信息]---------------------------------------------------------------- [信息]构建斐济2.1.2-SNAPSHOT [信息]------------------------------------[jar]--------------------------------- [信息] [信息]---maven enforcer插件:1.4.1:enforce(强制执行规则)@fiji--- [信息]添加忽略:模块信息 [INFO]添加忽略:META-INF/versions/*/module INFO [信息]添加忽略:com.esotericsoftware.kryo* [信息]添加忽略:com.esotericsoftware.minlog* [信息]添加忽略:com.esotericsoftware.reflectasm* [信息]添加忽略:com.google.inject* [信息]添加忽略:jnr.ffi* [信息]添加忽略:org.apache.hadoop.warn.*.package信息 [信息]添加忽略:org.apache.spark.unused.UnusedStubClass [信息]添加忽略:org.hibernate.stat.ConcurrentStatisticsImpl [信息]添加忽略:org.jetbrains.kotlin.daemon.common* [信息]添加忽略:org.junit.runner.runner [信息]添加忽略:模块信息 [信息]添加忽略:模块信息 [警告]规则2:org.apache.maven.plugins.enforcer.RequireJavaVersion失败,消息为: 检测到的JDK版本:11.0.8不在允许的范围[1.8.0-101,1.8.9999]内。 [信息]------------------------------------------------------------------------ [信息]生成失败 [信息]------------------------------------------------------------------------ [信息]总时间:22.131秒 [信息]完成时间:2020-08-23T23:01:01+04:30 [信息]------------------------------------------------------------------------ [错误]无法在项目斐济上执行目标org.apache.maven.plugins:maven enforcer插件:1.4.1:enforce(强制规则):某些强制规则失败。查看上面解释规则失败原因的特定消息。->[帮助1] [错误] [错误]要查看错误的完整堆栈跟踪,请使用-e开关重新运行Maven。 [错误]使用-X开关重新运行Maven以启用完整调试日志记录。 [错误] [错误]有关错误和可能的解决方案的更多信息,请阅读以下文章: [错误][帮助1]http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException ali@ali-所有系列:~/Downloads/fiji master$
如何修复此问题?将
JAVA\u HOME
环境变量设置为
JAVA 1.8
目录

例如:

JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/

JAVA_HOME
环境变量设置为
JAVA 1.8
目录

例如:

JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/

这并不是针对你的具体情况,尽管它可能会有所帮助


例如,在Eclipse中,您可以从斐济的Java文件夹转到Preferences>Java>Installed JREs>AddJDK1.8。这至少解决了Eclipse上的版本冲突。您应该能够为其他IDE更改类似的路径。

这并不是针对您的具体情况,尽管它可能会有所帮助


例如,在Eclipse中,您可以从斐济的Java文件夹转到Preferences>Java>Installed JREs>AddJDK1.8。这至少解决了Eclipse上的版本冲突。您应该能够以类似方式更改其他IDE的路径。

是否安装了Java 1.8?是否安装了Java 1.8?我的JDK版本是11.0.8。此错误是否表示此程序与此JDK版本不兼容?我的JDK版本是11.0.8。此错误是否表示此程序与此JDK版本不兼容?