检测到 JDK 版本:11.0.8 不在允许范围内 [1.8.0-101,1.8.9999] [英] Detected JDK Version: 11.0.8 is not in the allowed range [1.8.0-101,1.8.9999]

查看:153
本文介绍了检测到 JDK 版本:11.0.8 不在允许范围内 [1.8.0-101,1.8.9999]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to build fiji software from it's source code.here's the github page:fiji source code I started with building project using maven from ubuntu's terminal and I faced with this error:

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$ 

我怎样才能解决这个问题?

how can i fix this?

推荐答案

JAVA_HOME 环境变量设置为 Java 1.8 目录.

Set JAVA_HOME environment variable to Java 1.8 directory.

示例:

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

这篇关于检测到 JDK 版本:11.0.8 不在允许范围内 [1.8.0-101,1.8.9999]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆