Closed mbarbero closed 4 years ago
Does -verbose:sizes
give you the information you need?
-XshowSettings
is an option that is parsed by the launcher, resulting in an upcall to a Java helper, while *_JAVA_OPTIONS
are processed by the VM and are not seen by the launcher.
Yes, -verbose:sizes
gives me what I need (and more). Issue is: it's less portable. I'd like to use -XshowSettings
in JAVA_TOOL_OPTIONS
as it would work with hotspot / openj9
This is expected behavior, but I can see the User Guide needs some updates to make this clear. There is a partial list of options that won't work in the environment variables found in https://www.eclipse.org/openj9/docs/xoptionsfile/
When testing with a version of Hotspot, I get similar behaviour:
$ ~/projects/jdk8/jdk8u212-b03/Contents/Home/bin/java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_212-b03)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.212-b03, mixed mode)
$ ~/projects/jdk8/jdk8u212-b03/Contents/Home/bin/java -version
Picked up JAVA_TOOL_OPTIONS: -XshowSettings:vm
Unrecognized option: -XshowSettings:vm
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
My bad, I did not try with Hotspot. As I tried with openj9 first, I was just assuming this was a different behavior. I guess I should raise an issue against openjdk then. Sorry about the noise.
Thanks for raising the issue @mbarbero. It helped highlight a short-coming in our documentation which we're fixing in eclipse/openj9-docs#487
Java -version output
Summary of problem
When I add
-XshowSettings:vm
to eitherOPENJ9_TOOL_OPTIONS
orJAVA_TOOL_OPTIONS
, OpenJ9 fails with:See steps below to reproduce