Java 检测到的JDK版本:11.0.8不在允许的范围[1.8.0-101,1.8.9999]
我正在尝试从斐济软件的源代码构建斐济软件。以下是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以启用对进一步非法访问操作的警告 警告:所有非法访问操作将在未来版本中被拒绝 [信息]正在扫描项目。。。 [信息] [信息]------------------------------------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
如何修复此问题?将
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版本不兼容?