The redirector only processes IBM_JAVA_OPTIONS if the OPENJ9 version isn't set:
https://github.com/eclipse/openj9/blob/9258a5aa4d1839d9df92d268dd4588a699576bdd/runtime/redirector/redirector.c#L534-L538
The vmargs.c code processes both options unconditionally:
https://github.com/eclipse/openj9/blob/a43aee9d618b9335d0a36f4b47eb0056ad8a8995/runtime/util/vmargs.c#L1394-L1395
The vmargs.c code should be updated to only read IBM_JAVA_OPTIONS if OPENJ9_JAVA_OPTIONS is not set.
Related to #3513
FYI @pdbain-ibm
For the record, the redirector doesn't handle JAVA_TOOL_OPTIONS at all (and never has), while vmargs.c does (and always has). The redirector looks at the environment variable solely to choose the sidecar.
FYI @pshipton and @gacholio
further to issue https://github.com/eclipse/openj9/issues/3478, particularly
https://github.com/eclipse/openj9/issues/3478#issuecomment-434695237 and
https://github.com/eclipse/openj9/issues/3478#issuecomment-435062184.
As I understand @DanHeidinga's intent, the arguments are the union of:
JAVA_TOOL_OPTIONSOPENJ9_JAVA_OPTIONS IBM_JAVA_OPTIONS (only if OPENJ9_JAVA_OPTIONS is not set)Environment variables are processed in that order.
Pull request https://github.com/eclipse/openj9/pull/3911 opened.
Most helpful comment
FYI @pshipton and @gacholio
further to issue https://github.com/eclipse/openj9/issues/3478, particularly
https://github.com/eclipse/openj9/issues/3478#issuecomment-434695237 and
https://github.com/eclipse/openj9/issues/3478#issuecomment-435062184.
As I understand @DanHeidinga's intent, the arguments are the union of:
JAVA_TOOL_OPTIONSOPENJ9_JAVA_OPTIONSIBM_JAVA_OPTIONS(only ifOPENJ9_JAVA_OPTIONSis not set)Environment variables are processed in that order.