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

Set JAVA_TOOL_OPTIONS environment variable instead of nonstandard JAVA_OPTS #1013

Merged
merged 2 commits into from
Oct 20, 2021

Conversation

jerryz123
Copy link
Contributor

@jerryz123 jerryz123 commented Oct 19, 2021

The JAVA_TOOL_OPTIONS environment variable is passed to all Java processes.
This is useful for Java processes that somehow miss the flags passed in via command line. In particular, the JVM launched by initialization of the SBT thin client for some reason. only sees flags passed in by JAVA_TOOL_OPTIONS.

https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars002.html

The adjusted Makefile passes in the Java flags through both command line, and through the JAVA_TOOL_OPTIONS environment variable. This should not cause problems, and should minimize risk.

Type of change: other enhancement

Impact: software change | API change

Release Notes
JAVA_OPTS Makefile variable has been changed to the standard JAVA_TOOL_OPTIONS variable.

…A_OPTS

The JAVA_TOOL_OPTIONS environment variable is passed to all Java processes.
This is useful for Java processes that somehow miss the flags passed in via command line, in particular, the JVM launched by initialization of the SBT thin client only sees flags passed in by JAVA_TOOL_OPTIONS.
@tymcauley
Copy link
Contributor

I've had this issue with the thin client not using the JAVA_OPTS environment variable, and then getting lots of garbage collection issues (and sometimes out-of-memory errors), this will be an awesome change! Thanks!

@jerryz123
Copy link
Contributor Author

I've had this issue with the thin client not using the JAVA_OPTS environment variable, and then getting lots of garbage collection issues (and sometimes out-of-memory errors), this will be an awesome change! Thanks!

Haha this is exactly why I looked into this. Trying to get larger designs to build in 1GB of heap was a hopeless effort.

Copy link
Contributor

@abejgonzalez abejgonzalez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with changing this API... the CI also needs to change though.

Copy link
Contributor

@abejgonzalez abejgonzalez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jerryz123 jerryz123 merged commit 52f76ce into dev Oct 20, 2021
@jerryz123 jerryz123 deleted the java_tool_options branch November 3, 2021 06:49
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

Successfully merging this pull request may close these issues.

3 participants