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

.jvmopts memory options ignored unless they are first in the file #5425

Open
NirvanaNrv opened this issue Feb 7, 2020 · 2 comments
Open
Labels
area/runner-script issues around sbt-the-bash-script, or bat script area/windows Windows-specific issue Bug

Comments

@NirvanaNrv
Copy link

steps

With sbt 1.3.8 Windows setup, use a local .jvmopts such as
-XX:ReservedCodeCacheSize=128m
-Xss2m
-Xmx1536m
-Xms1512m

problem

The jvm launches with the default memory settings instead of those from the file.

expectation

Uses them.

notes

In the :addDefaultMemory section, there is a for /F %%g in ("!_JAVA_OPTS!"), which would work only for the first argument of this space separated string. I had success replacing it with just for %%g in (!_JAVA_OPTS!), but I did not push through the thought about possible spaces or quotes within jvm options. The workaround of putting -Xmx or -Xms first is fine, once you know it.

@NirvanaNrv NirvanaNrv added the Bug label Feb 7, 2020
@eed3si9n eed3si9n added area/runner-script issues around sbt-the-bash-script, or bat script area/windows Windows-specific issue labels Feb 8, 2020
@eed3si9n
Copy link
Member

eed3si9n commented Feb 8, 2020

@NirvanaNrv Thanks for the report!

@er1c
Copy link
Contributor

er1c commented Dec 30, 2020

This is related to the "=" bug in our windows bat argument parsing. If you use another argument other than -XX:ReservedCodeCacheSize=128m (which has the =) in it, it would work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/runner-script issues around sbt-the-bash-script, or bat script area/windows Windows-specific issue Bug
Projects
None yet
Development

No branches or pull requests

3 participants