scala/scala — pull request #2767 by gourlaysama (2013-07-24 09:10:40+00:00)
Title: SI-4907 scala.bat now honors -J options on Windows.

This makes scala.bat parse and use -J options like the sh version.
Specifically:
- if `%JAVA_OPTS%` is not defined and no -J option is given, it uses the default values that get embedded in the script (currrently `-Xmx256M -Xms32M`),
- if `%JAVA_OPTS%` is not defined but there are -J options, they are appended to the default values and are also given as scala arguments, as in:

```bat
scala -J-Xmx512m Test
```
will result in:
```bat
java -Xmx256M -Xms32M -Xmx512m [...] [scala main] -J-Xmx512m Test
```
- if both `%JAVA_OPTS%` and -J options are defined, the latter are appended to the former, as in:

```bat
set JAVA_OPTS=-Xmx512m
scala -J-Xms64m Test
```
will result in:
```bat
java -Xmx512m -Xms64m [...] [scala main] -J-Xms64m Test
```

This seems to be the exact same behavior as the sh launcher.

----
Review by @som-snytt, please :)