With adoptopenjdk-8-openj9 if I debug an sbt task it fails: "JVMJ9VM007E Command-line option unrecognised: --add-opens"
Hi
I'm unable to debug and sbt task under openjdk-8-openj9 .
Steps to recreate:
- install adoptopenjdk-8-openj9
- create a new Play project with: "sbt new playframework/play-scala-seed.g8"
- import project into IntelliJ Ultimate EAP
- for run configuration add an sbt tag "run"
- debug that task
This will fail straight away with "JVMJ9VM007E Command-line option unrecognised: --add-opens"
I am using:
java -version
openjdk version "1.8.0_292"
OpenJDK Runtime Environment (build 1.8.0_292-b10)
Eclipse OpenJ9 VM (build openj9-0.26.0, JRE 1.8.0 Mac OS X amd64-64-Bit Compressed References 20210421_909 (JIT enabled, AOT enabled)
OpenJ9 - b4cc246d9
OMR - 162e6f729
JCL - 2a5e268814 based on jdk8u292-b10)
and
IntelliJ IDEA 2021.2 EAP (Ultimate Edition)
Build #IU-212.3116.43, built on May 27, 2021
IntelliJ IDEA EAP User
Expiration date: June 26, 2021
Runtime version: 11.0.11+9-b1460.1 x86_64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
macOS 11.4
GC: G1 Young Generation, G1 Old Generation
Memory: 750M
Cores: 4
Registry: scala.erase.compiler.process.jdk.once=false
Non-Bundled Plugins: org.intellij.scala (2021.2.8)
Kotlin: 212-1.4.32-release-IJ3116.43
The Build output window reads:
Abnormal build process termination:
/Library/Java/JavaVirtualMachines/adoptopenjdk-8-openj9.jdk/Contents/Home/bin/java -Xmx700m -Djava.awt.headless=true -Djdt.compiler.useSingleThread=true -Dcompile.parallel=false -Drebuild.on.dependency.change=true -Dio.netty.initialSeedUniquifier=4608929229460153449 -Dfile.encoding=UTF-8 -Duser.language=en -Duser.country=GB -Didea.paths.selector=IntelliJIdea2021.2 "-Didea.home.path=/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents" "-Didea.config.path=/Users/dave/Library/Application Support/JetBrains/IntelliJIdea2021.2" "-Didea.plugins.path=/Users/dave/Library/Application Support/JetBrains/IntelliJIdea2021.2/plugins" -Djps.log.dir=/Users/dave/Library/Logs/JetBrains/IntelliJIdea2021.2/build-log "-Djps.fallback.jdk.home=/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/jbr/Contents/Home" -Djps.fallback.jdk.version=11.0.11 -Dio.netty.noUnsafe=true -Djava.io.tmpdir=/Users/dave/Library/Caches/JetBrains/IntelliJIdea2021.2/compile-server/agent-frontend_9f86d577/_temp_ -Djps.backward.ref.index.builder=true -Dtmh.instrument.annotations=true -Dcompile.parallel.max.threads=4 -Dcompile.parallel=true --add-opens java.base/java.util=ALL-UNNAMED -Dscala.compiler.indices.rebuild=true -classpath "/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/plugins/java/lib/jps-launcher.jar" org.jetbrains.jps.cmdline.Launcher "/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/lib/jna.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/plugins/java/lib/jps-builders-6.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/plugins/java/lib/maven-resolver-transport-file-1.3.3.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/lib/jna-platform.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/plugins/java/lib/javac2.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/lib/jps-model.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/lib/util.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/lib/resources_en.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/plugins/java/lib/maven-resolver-transport-http-1.3.3.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/plugins/java/lib/maven-resolver-connector-basic-1.3.3.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/plugins/java/lib/jps-javac-extension-1.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/lib/platform-api.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/lib/3rd-party.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/lib/forms_rt.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/lib/slf4j.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/lib/kotlin-stdlib-jdk8.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/plugins/java/lib/aether-dependency-resolver.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/lib/idea_rt.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/lib/annotations.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/plugins/java/lib/jps-builders.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/lib/protobuf-java-3.15.8.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/plugins/eclipse/lib/eclipse-jps.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/plugins/eclipse/lib/eclipse-common.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/plugins/IntelliLang/lib/java-langInjection-jps.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/plugins/Groovy/lib/groovy-jps.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/plugins/Groovy/lib/groovy-constants-rt.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/plugins/devkit/lib/devkit-jps.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/plugins/javaFX/lib/javaFX-jps.jar:/Users/dave/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.3116.43/IntelliJ IDEA 2021.2 EAP.app/Contents/plugins/javaFX/lib/javaFX-common.jar:/Users/dave/Library/Application Support/JetBrains/IntelliJIdea2021.2/plugins/Scala/lib/scala-library.jar:/Users/dave/Library/Application Support/JetBrains/IntelliJIdea2021.2/plugins/Scala/lib/compiler-shared.jar:/Users/dave/Library/Application Support/JetBrains/IntelliJIdea2021.2/plugins/Scala/lib/jps/nailgun.jar:/Users/dave/Library/Application Support/JetBrains/IntelliJIdea2021.2/plugins/Scala/lib/jps/compiler-jps.jar:/Users/dave/Library/Application Support/JetBrains/IntelliJIdea2021.2/plugins/Scala/lib/jps/sbt-interface.jar:/Users/dave/Library/Application Support/JetBrains/IntelliJIdea2021.2/plugins/Scala/lib/jps/incremental-compiler.jar:/Users/dave/Library/Application Support/JetBrains/IntelliJIdea2021.2/plugins/Scala/lib/jps/scala-parallel-collections.jar:/Users/dave/Library/Application Support/JetBrains/IntelliJIdea2021.2/plugins/Scala/lib/spray-json_2.13-1.3.5.jar:/Users/dave/Library/Application Support/JetBrains/IntelliJIdea2021.2/plugins/Scala/lib/scala-compiler-indices-protocol_2.12-0.1.1.jar:/Users/dave/Library/Application Support/JetBrains/IntelliJIdea2021.2/plugins/Scala/lib/scala-library.jar:/Users/dave/Library/Application Support/JetBrains/IntelliJIdea2021.2/plugins/Scala/lib/scala-play-2-jps-plugin.jar:/Users/dave/Library/Application Support/JetBrains/IntelliJIdea2021.2/plugins/Scala/launcher/sbt-launch.jar" org.jetbrains.jps.cmdline.BuildMain 127.0.0.1 49517 e4f949df-bab8-4d99-9d6c-bda727e432a7 /Users/dave/Library/Caches/JetBrains/IntelliJIdea2021.2/compile-server
JVMJ9VM007E Command-line option unrecognised: --add-opens
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
I'd appreciate knowing how to make this work please, at the moment the best I can do is to run with a hotspot openjdk8
Please sign in to leave a comment.
Does your project require Java 8? Did you try it with JDK 11?
Hi Serge
Yes, I'm afraid it does require the Java 8 JDK and we run in Production with the OpenJ9 JVM.
Of course, I can run with the hotspot JVM or a later JDK, but it is a compromise.
I'm familiar with the use of that --add-opens, I use it in JAVA_OPTS for sbt, but I don't think it can be included on a Java command line, as IntelliJ is doing here, why not must be for technical reasons that are beyond me.
Thanks for your interest
Thanks for the details, please follow https://youtrack.jetbrains.com/issue/IDEA-270785 for updates. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135 if you are not familiar with YouTrack.
Please check if you have Lombok plugin installed and enabled.
If yes, does disabling the plugin and restarting the IDE help?
It is installed and enabled.
Sorry that I have not been able to reply sooner.
Now using:
I can no longer see the problem.
Perhaps that is what you would expect?
Hi Dave,
these are properties of the IDE runtime. The build is run in a separate process. My question was about the LombokPlugin, which, if installed and enabled, can indirectly influence build process startup arguments.