使用GraalVM JDK构建/运行您的应用程序

时间:2019-11-25 22:27:37

标签: java intellij-idea graalvm

我正在尝试使用GraalVM JDK构建我的应用程序。我在选定的“平台设置> SDK”中添加了GraalVM JDK,然后单击“确定”。

enter image description here

构建项目时,我可以看到它仍在使用“ java”的其他可执行文件。

/../_sandbox/lib/jdk8.0.222/bin/java -Dmaven.multiModuleProjectDirectory=/../Desktop/_sandbox/someproject "-Dmaven.home=/../Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/192.7142.36/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3" -Didea.modules.paths.file=/../Library/Caches/IntelliJIdea2019.2/Maven/idea-projects-state-3333fba9.properties -Dclassworlds.conf=/private/var/folders/2g/9fxnhqts6qsf_h81cnbts8tc0000gn/T/idea-7-mvn.conf "-Dmaven.ext.class.path=/../Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/192.7142.36/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven-event-listener.jar" "-javaagent:/../Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/192.7142.36/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=49971:/../Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/192.7142.36/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/../Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/192.7142.36/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.6.0.jar" org.codehaus.classworlds.Launcher -Didea.version2019.2.4 clean install
Picked up JAVA_TOOL_OPTIONS: -Duser.timezone=Etc/UTC -XX:+UseJVMCICompiler
Unrecognized VM option 'UseJVMCICompiler'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

我在GraalVM上使用“ -XX:+ UseJVMCICompiler”标志,因为普通的JDK1.8不支持该标志,所以我报错。

我希望Java路径为/../_sandbox/lib/graalvm-ce-java8-19.3.0/Contents/Home/bin/java,如果

1 个答案:

答案 0 :(得分:1)

您还需要将Project和Module SDK更改为 GraalVM

1

2

还要确保启用此设置:

3