Ali Rayat
Ali Rayat

Reputation: 55

Detected JDK Version: 11.0.8 is not in the allowed range [1.8.0-101,1.8.9999]

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?

Upvotes: 4

Views: 15778

Answers (2)

Timecode
Timecode

Reputation: 11

This isn't quite specific to your situation, though it may be helpful.

For example, in Eclipse you can go to Preferences > Java > Installed JREs > Add the JDK 1.8 from Fiji's Java folder. This resolves version conflicts on Eclipse at least. You should be able to change the path similarly for other IDEs.

Upvotes: 1

talex
talex

Reputation: 20455

Set JAVA_HOME environment variable to Java 1.8 directory.

Example:

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

Upvotes: 4

Related Questions