JAVA - _JAVA_OPTIONS and JAVA_TOOL_OPTIONS environment variable
JAVA_TOOL_OPTIONS and _JAVA_OPTIONS are 2 useful environment variables which allow user to set JVM options in the form of environment variables, rather than setting it at the command line. But, they have slight differences
1. Precedence - From my testing, the precedence (order of evaluation) is
_JAVA_OPTIONS > Command line > JAVA_TOOL_OPTIONS
With this, there is different use-case for _JAVA_OPTIONS and JAVA_TOOL_OPTIONS
For _JAVA_OPTIONS, you could use it to overwrite the JVM options which has been defined in the command line.
For JAVA_TOOL_OPTIONS, you could use it to put additional JVM options for the predefined command line.
2. Documentation - JAVA_TOOL_OPTIONS is well documented but _JAVA_OPTIONS. So, _JAVA_OPTIONS may not be officially supported.
3. Support - _JAVA_OPTIONS is Oracle specific. The IBM Java equivalent will be IBM_JAVA_OPTIONS. JAVA_TOOL_OPTIONS is platform independent.
Reference:
1. JAVA_TOOLS_OPTIONS
2. IBM_JAVA_OPTIONS
3. http://stackoverflow.com/questions/28327620/difference-between-java-options-java-tool-options-and-java-opts
1. Precedence - From my testing, the precedence (order of evaluation) is
_JAVA_OPTIONS > Command line > JAVA_TOOL_OPTIONS
With this, there is different use-case for _JAVA_OPTIONS and JAVA_TOOL_OPTIONS
For _JAVA_OPTIONS, you could use it to overwrite the JVM options which has been defined in the command line.
For JAVA_TOOL_OPTIONS, you could use it to put additional JVM options for the predefined command line.
2. Documentation - JAVA_TOOL_OPTIONS is well documented but _JAVA_OPTIONS. So, _JAVA_OPTIONS may not be officially supported.
3. Support - _JAVA_OPTIONS is Oracle specific. The IBM Java equivalent will be IBM_JAVA_OPTIONS. JAVA_TOOL_OPTIONS is platform independent.
Reference:
1. JAVA_TOOLS_OPTIONS
2. IBM_JAVA_OPTIONS
3. http://stackoverflow.com/questions/28327620/difference-between-java-options-java-tool-options-and-java-opts
Comments
Post a Comment