英文:
Apache Ignite support for java 17
问题
Apache Ignite 2.14.0 是否与 Java 17 兼容?
尝试运行一个使用 Apache Ignite 2.14.0 的 Java 17 应用程序时出现了以下错误:
在使用 Apache 2.14.0 的 Java 17 应用程序中运行时出现错误
英文:
Does apache ignite 2.14.0 work with java 17?
Tried running a java 17 application which uses apache ignite 2.14.0 and this error occured:
Error while running java 17 application using which uses apache 2.14.0
答案1
得分: 5
是的,需要。正如文档所述,请使用以下的JVM选项:
--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED \
--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED \
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED \
--add-opens=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
--add-opens=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
--add-opens=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED \
--add-opens=java.base/java.io=ALL-UNNAMED \
--add-opens=java.base/java.nio=ALL-UNNAMED \
--add-opens=java.base/java.util=ALL-UNNAMED \
--add-opens=java.base/java.lang=ALL-UNNAMED
或者,使用ignite.sh / ignite.bat 脚本,它们会为您执行此操作。
英文:
Yes, it does. As the doc says, use the following JVM options:
--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED \
--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED \
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED \
--add-opens=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
--add-opens=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
--add-opens=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED \
--add-opens=java.base/java.io=ALL-UNNAMED \
--add-opens=java.base/java.nio=ALL-UNNAMED \
--add-opens=java.base/java.util=ALL-UNNAMED \
--add-opens=java.base/java.lang=ALL-UNNAMED
Or, use ignite.sh / ignite.bat scripts, which do this for you.
答案2
得分: 0
这是我在使用Ignite和Java17时使用的spring-boot-maven-plugin的JVM参数配置:
<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <configuration>
        <jvmArguments>
            --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED
            --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED
            --add-opens=java.base/sun.nio.ch=ALL-UNNAMED
            --add-opens=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED
            --add-opens=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED
            --add-opens=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED
            --add-opens=java.base/java.io=ALL-UNNAMED
            --add-opens=java.base/java.nio=ALL-UNNAMED
            --add-opens=java.base/java.util=ALL-UNNAMED
            --add-opens=java.base/java.lang=ALL-UNNAMED
        </jvmArguments>
    </configuration>
</plugin>
英文:
Here's the spring-boot-maven-plugin JVM arguments configuration I'm using with Ignite & Java17.
                 <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <configuration>
                        <jvmArguments>
                            --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED
                            --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED
                            --add-opens=java.base/sun.nio.ch=ALL-UNNAMED
                            --add-opens=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED
                            --add-opens=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED
                            --add-opens=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED
                            --add-opens=java.base/java.io=ALL-UNNAMED
                            --add-opens=java.base/java.nio=ALL-UNNAMED
                            --add-opens=java.base/java.util=ALL-UNNAMED
                            --add-opens=java.base/java.lang=ALL-UNNAMED
                        </jvmArguments>
                    </configuration>
                </plugin>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论