Openj9: IBM_JAVA_OPTIONS should only be checked if OPENJ9_JAVA_OPTIONS not set

Created on 3 Dec 2018  路  4Comments  路  Source: eclipse/openj9

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

bug vm

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:

  1. JAVA_TOOL_OPTIONS
  2. OPENJ9_JAVA_OPTIONS
  3. IBM_JAVA_OPTIONS (only if OPENJ9_JAVA_OPTIONS is not set)

Environment variables are processed in that order.

All 4 comments

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:

  1. JAVA_TOOL_OPTIONS
  2. OPENJ9_JAVA_OPTIONS
  3. IBM_JAVA_OPTIONS (only if OPENJ9_JAVA_OPTIONS is not set)

Environment variables are processed in that order.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pshipton picture pshipton  路  3Comments

BillOgden picture BillOgden  路  6Comments

JasonFengJ9 picture JasonFengJ9  路  3Comments

JasonFengJ9 picture JasonFengJ9  路  5Comments

JamesKingdon picture JamesKingdon  路  5Comments