The VM parses options from an environment variable IBM_JAVA_OPTIONS, which isn't really appropriate for OpenJ9. I propose also parsing options from OPENJ9_JAVA_OPTIONS.
Should be fairly simple:
vmargs.c: addEnvironmentVariables() add another call to addEnvironmentVariableArguments() after ENVVAR_IBM_JAVA_OPTIONSWhat should the priority be? I suggest:
Opened pull request https://github.com/eclipse/openj9/pull/3495.
I'd flip 2 and 3 in the above list - new env var is the winner. I assume in the current VM that IBM_JAVA_OPTIONS overrides JAVA_TOOL_OPTIONS?
In re
https://github.com/eclipse/openj9/issues/3478#issuecomment-434818935, yes.
I chose the order in inverse order of generality: since the IBM JDK logically builds on OpenJ9, the IBM option should override the OpenJ9 option. @DanHeidinga @pshipton your thoughts?
since the IBM JDK logically builds on OpenJ9, the IBM option should override the OpenJ9 option
makes sense to me.
I'd essentially argue the opposite - the IBM SDK is completely agnostic of OpenJ9. OpenJ9 is the new thing, so it's env var should be most specific (and probably shouldn't even be parsed in the IBM SDK).
OpenJ9 is the new thing, so it's env var should be most specific
That I agree with.
(and probably shouldn't even be parsed in the IBM SDK)
Puts on my IBM hat, the IBM option should be deprecated and replaced by the OpenJ9 option. The IBM SDK uses the same source and should prefer the OpenJ9-specific options
Deprecating the IBM_JAVA_OPTIONS variable is a good idea. FYI @SueChaplain .
Updating and re-testing.
There can be no removals from the IBM SDK. It could be deprecated in OpenJ9 only, and then only if there is no intention to replace the IBM SDK with OpenJ9 in the future.
With my OpenJ9 hat, I don't want to see us yank the rug out from under the IBM SDK but we can (and should!) move towards replacing IBMisms with OpenJ9isms.
IBM will have to adapt to this in their builds if it causes an issue.
(For the IBMers following along, I've already asked that the IBM_JAVA_OPTIONS env var be marked as deprecated in the IBM doc)
@pdbain-ibm an issue needs to be opened at https://github.com/eclipse/openj9-docs for any doc changes.
The doc change has been created: https://github.com/eclipse/openj9-docs/issues/131
@pshipton, @DanHeidinga ... Docs currently being updated to reflect this change (eclipse/openj9-docs#131) but wanted to ask about manifest files. These currently have a section header named "IBM-Java-Options". Will/should this likewise be deprecated in favour of something like "OpenJ9-Java-Options"?
True. I will make the corresponding change in them manifest handling code.
Will/should this likewise be deprecated in favour of something like "OpenJ9-Java-Options"?
Yes, we should work on purging IBMisms from the documentation
So safe to assume that manifest section will be "OpenJ9-Java-Options"?
There are, of course, loads of env variables listed in the docs that start "IBM_"! See http://www.eclipse.org/openj9/docs/env_var/
Most helpful comment
I'd essentially argue the opposite - the IBM SDK is completely agnostic of OpenJ9. OpenJ9 is the new thing, so it's env var should be most specific (and probably shouldn't even be parsed in the IBM SDK).