diff options
author | Antoine Gourlay <antoine@gourlay.fr> | 2013-07-24 01:19:56 +0200 |
---|---|---|
committer | Antoine Gourlay <antoine@gourlay.fr> | 2013-07-28 19:10:25 +0200 |
commit | cd4198789cf99984df0ec3acf8351f19ef96d20e (patch) | |
tree | 7406db5191d3eef27d0b4e99d8ab837477261a65 /test/files/codelib | |
parent | fc4b464faeb43c3e2917b11a95c4f84481c443f7 (diff) | |
download | scala-cd4198789cf99984df0ec3acf8351f19ef96d20e.tar.gz scala-cd4198789cf99984df0ec3acf8351f19ef96d20e.tar.bz2 scala-cd4198789cf99984df0ec3acf8351f19ef96d20e.zip |
SI-4907 SI-4615 scala.bat honors -J and -D options.
This makes scala.bat parse and use -J and -D arguments.
Specifically:
- Parameters starting with -J are stripped of the prefix, unquoted if
necessary and appended to %JAVA_OPTS% or default values.
- Parameters starting with -D are unquoted if necessary and then
appended to the others. The right-hand side of a property can be
quoted or not.
- All of those are given to `java` before any other parameters.
- The above only happens on parameter preceding the first parameter
that does not start with "-" (usually a class name).
- The exact arguments passed to scala.bat are also given as-is to
the scala launcher (including -J and -D arguments).
set JAVA_OPTS=-Xmx512m
scala -J-Xmx128m -Dprop1=42 -Dprop2="hello world" "-Dprop3=bar"
"-J-Xms64m" Test foo
will result in
java -Xmx512m -Xmx128m -Dprop1=42 -Dprop2="hello world" -Dprop3=bar
-Xms64m [cp, scala main] -J-Xmx128m -Dprop1=42 -Dprop2="hello world"
"-Dprop3=bar" "-J-Xms64m" Test foo
Diffstat (limited to 'test/files/codelib')
0 files changed, 0 insertions, 0 deletions