Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use JAVA_TOOL_OPTIONS instead of _JAVA_OPTIONS #895

Open
bogdanap opened this issue Aug 31, 2017 · 3 comments
Open

Use JAVA_TOOL_OPTIONS instead of _JAVA_OPTIONS #895

bogdanap opened this issue Aug 31, 2017 · 3 comments

Comments

@bogdanap
Copy link
Contributor

In #885 we introduced _JAVA_OPTIONS in an attempt to control JVM memory allocation.
Documentation suggests that JAVA_TOOL_OPTIONS is actually recommended for these cases.

The difference is pretty neatly explained here:
https://stackoverflow.com/questions/28327620/difference-between-java-options-java-tool-options-and-java-opts

@eregon
Copy link

eregon commented Sep 14, 2017

For info, this has the same problem as mentioned in travis-ci/travis-ci#8408 (comment) (extra output on stderr for every java process)

@leonard84
Copy link

JAVA_TOOL_OPTIONS is the better choice compared to _JAVA_OPTIONS. However Xms should not be defined.

@eregon
Copy link

eregon commented Sep 20, 2017

To clarify, JAVA_TOOL_OPTIONS is also printed on stderr on every Java command, so it's not any better in terms of extra output:

$ JAVA_TOOL_OPTIONS=-Xmx2g java -version
Picked up JAVA_TOOL_OPTIONS: -Xmx2g
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-b12)
OpenJDK 64-Bit Server VM (build 25.131-b12, mixed mode)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@eregon @leonard84 @bogdanap and others