[ 
https://issues.apache.org/jira/browse/IGNITE-8618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16507294#comment-16507294
 ] 

Melan Jayasinghage commented on IGNITE-8618:
--------------------------------------------

I am using Ignite 2.5.0 and would like to run it on Java 10. What should be the 
JVM_OPTS for Java 10 compatibility ? I am using the same options as Java 9 as 
below.. 
{code:java}
${JAVA_HOME}/bin/java -version 2>&1 | grep -qE 'java version "(9|10).*"' && {
JVM_OPTS="--add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
          --add-exports java.base/sun.nio.ch=ALL-UNNAMED \
          --add-exports java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
          --add-exports jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
          --add-modules java.xml.bind \
      ${JVM_OPTS}"
} || true{code}
Ignite working fine but showing following  warning on startup, is it safe to 
ignore ?
{code:java}
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by 
org.apache.ignite.internal.util.GridUnsafe$2 
(file:/opt/apache-ignite-fabric-2.5.0/libs/ignite-core-2.5.0.jar) to field 
java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of 
org.apache.ignite.internal.util.GridUnsafe$2
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
{code}

> Support Java 10
> ---------------
>
>                 Key: IGNITE-8618
>                 URL: https://issues.apache.org/jira/browse/IGNITE-8618
>             Project: Ignite
>          Issue Type: Task
>    Affects Versions: 2.4
>            Reporter: Anghel Botos
>            Priority: Major
>
> Please make required changes so that Ignite runs on Java 10.
> The blocking issue I encontered is related to the usage of Unsafe:
> Caused by: java.lang.RuntimeException: jdk.internal.misc.JavaNioAccess class 
> is unavailable.
>  at 
> org.apache.ignite.internal.util.GridUnsafe.javaNioAccessObject(GridUnsafe.java:1459)
>  at org.apache.ignite.internal.util.GridUnsafe.<clinit>(GridUnsafe.java:118)
>  ... 30 more
> Caused by: java.lang.IllegalAccessException: class 
> org.apache.ignite.internal.util.GridUnsafe cannot access class 
> jdk.internal.misc.SharedSecrets (in module java.base) because module 
> java.base does not export jdk.internal.misc to unnamed module @754ba872
>  at 
> java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:360)
>  at 
> java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:589)
>  at java.base/java.lang.reflect.Method.invoke(Method.java:556)
>  at 
> org.apache.ignite.internal.util.GridUnsafe.javaNioAccessObject(GridUnsafe.java:1456)
>  ... 31 more
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to