diff options
Diffstat (limited to 'src/compiler/scala/tools/ant/templates/tool-windows.tmpl')
-rw-r--r-- | src/compiler/scala/tools/ant/templates/tool-windows.tmpl | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl index 8441f3af23..50e44fb669 100644 --- a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl +++ b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl @@ -25,6 +25,10 @@ shift :notoolcp +rem SI-8358, SI-8368 -- the default should really be false, +rem but I don't want to flip the default during 2.11's RC cycle +set _OVERRIDE_USEJAVACP="-Dscala.usejavacp=true" + rem We keep in _JAVA_PARAMS all -J-prefixed and -D-prefixed arguments set _JAVA_PARAMS= @@ -45,6 +49,10 @@ if "%_TEST_PARAM:~0,2%"=="-J" ( ) if "%_TEST_PARAM:~0,2%"=="-D" ( + rem Only match beginning of the -D option. The relevant bit is 17 chars long. + if "%_TEST_PARAM:~0,17%"=="-Dscala.usejavacp" ( + set _OVERRIDE_USEJAVACP= + ) rem test if this was double-quoted property "-Dprop=42" for /F "delims== tokens=1-2" %%G in ("%_TEST_PARAM%") DO ( if not "%%G" == "%_TEST_PARAM%" ( @@ -120,13 +128,13 @@ if defined _JAVA_PARAMS set _JAVA_OPTS=%_JAVA_OPTS% %_JAVA_PARAMS% set _TOOL_CLASSPATH=@classpath@ if "%_TOOL_CLASSPATH%"=="" ( - for %%f in ("!_SCALA_HOME!\lib\*") do call :add_cpath "%%f" + for %%f in ("!_SCALA_HOME!\lib\*.jar") do call :add_cpath "%%f" for /d %%f in ("!_SCALA_HOME!\lib\*") do call :add_cpath "%%f" ) if not "%_LINE_TOOLCP%"=="" call :add_cpath "%_LINE_TOOLCP%" -set _PROPS=-Dscala.home="!_SCALA_HOME!" -Denv.emacs="%EMACS%" -Dscala.usejavacp=true @properties@ +set _PROPS=-Dscala.home="!_SCALA_HOME!" -Denv.emacs="%EMACS%" %_OVERRIDE_USEJAVACP% @properties@ rem echo "%_JAVACMD%" %_JAVA_OPTS% %_PROPS% -cp "%_TOOL_CLASSPATH%" @class@ @toolflags@ %* "%_JAVACMD%" %_JAVA_OPTS% %_PROPS% -cp "%_TOOL_CLASSPATH%" @class@ @toolflags@ %* |