Please sign in to comment.
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
- Loading branch information...
Showing with 66 additions and 2 deletions.