All "scala*" scripts put the Scala library in the boot class loader (appended to the standard Java boot library). Extension libraries are still loaded by the user class loader.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@7768 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
0e6614a70e
commit
92824a353e
|
@ -90,8 +90,8 @@ if [ "$BOOT_CLASSPATH" = "" ] ; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# The merge of all three previous classpaths. All Scala code must currently be in a single class loader.
|
||||
MERGED_CLASSPATH="$BOOT_CLASSPATH:$USER_CLASSPATH:$EXTENSION_CLASSPATH"
|
||||
# The merge of all non-boot classpaths.
|
||||
MERGED_CLASSPATH="$USER_CLASSPATH:$EXTENSION_CLASSPATH"
|
||||
|
||||
if $cygwin; then
|
||||
if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
|
||||
|
@ -101,6 +101,7 @@ if $cygwin; then
|
|||
fi
|
||||
SCALA_HOME=`cygpath --$format "$SCALA_HOME"`
|
||||
MERGED_CLASSPATH=`cygpath --path --$format "$MERGED_CLASSPATH"`
|
||||
BOOT_CLASSPATH=`cygpath --path --$format "$BOOT_CLASSPATH"`
|
||||
fi
|
||||
|
||||
${JAVACMD:=java} @javaflags@ -cp "$MERGED_CLASSPATH" -Dscala.home="$SCALA_HOME" @properties@ $USER_ARGS
|
||||
${JAVACMD:=java} @javaflags@ -Xbootclasspath/a:"$BOOT_CLASSPATH" -cp "$MERGED_CLASSPATH" -Dscala.home="$SCALA_HOME" @properties@ $USER_ARGS
|
||||
|
|
|
@ -63,13 +63,12 @@ goto :loop
|
|||
|
||||
:exec
|
||||
if not "%_EXTENSION_CLASSPATH%"=="" set _MYCLASSPATH=%_USER_CLASSPATH%;%_EXTENSION_CLASSPATH%
|
||||
if not "%_BOOT_CLASSPATH%"=="" set _MYCLASSPATH=%_BOOT_CLASSPATH%;%_MYCLASSPATH%
|
||||
|
||||
rem Variable _USER_CLASSPATH is set to CLASSPATH, %1 or . and DO NOT need to be quoted
|
||||
set _PROPS=-Dscala.home="%_SCALA_HOME%" @properties@
|
||||
|
||||
rem echo %_JAVACMD% @javaflags@ %_PROPS% -cp %_MYCLASSPATH% %_ARGS%
|
||||
%_JAVACMD% @javaflags@ %_PROPS% -cp %_MYCLASSPATH% %_ARGS%
|
||||
rem echo %_JAVACMD% -Xbootclasspath/a:%_BOOT_CLASSPATH% @javaflags@ %_PROPS% -cp %_MYCLASSPATH% %_ARGS%
|
||||
%_JAVACMD% -Xbootclasspath/a:%_BOOT_CLASSPATH% @javaflags@ %_PROPS% -cp %_MYCLASSPATH% %_ARGS%
|
||||
goto end
|
||||
|
||||
:version
|
||||
|
|
|
@ -54,9 +54,6 @@ if [ "$BOOT_CLASSPATH" = "" ] ; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# The merge of the two previous classpaths. All Scala code must currently be in a single class loader.
|
||||
MERGED_CLASSPATH="$BOOT_CLASSPATH:$EXTENSION_CLASSPATH"
|
||||
|
||||
if $cygwin; then
|
||||
if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
|
||||
format=mixed
|
||||
|
@ -64,7 +61,8 @@ if $cygwin; then
|
|||
format=windows
|
||||
fi
|
||||
SCALA_HOME=`cygpath --$format "$SCALA_HOME"`
|
||||
MERGED_CLASSPATH=`cygpath --path --$format "$MERGED_CLASSPATH"`
|
||||
EXTENSION_CLASSPATH=`cygpath --path --$format "$EXTENSION_CLASSPATH"`
|
||||
BOOT_CLASSPATH=`cygpath --path --$format "$BOOT_CLASSPATH"`
|
||||
fi
|
||||
|
||||
${JAVACMD:=java} @javaflags@ -cp "$MERGED_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.classpath="$CLASSPATH" -Dscala.tool.name="@name@" -Dscala.tool.version="@version@" @properties@ @class@ @toolflags@ "$@@"
|
||||
${JAVACMD:=java} @javaflags@ -Xbootclasspath/a:"$BOOT_CLASSPATH" -cp "$EXTENSION_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.classpath="$CLASSPATH" -Dscala.tool.name="@name@" -Dscala.tool.version="@version@" @properties@ @class@ @toolflags@ "$@@"
|
||||
|
|
|
@ -39,9 +39,6 @@ if "%_BOOT_CLASSPATH%"=="" (
|
|||
)
|
||||
)
|
||||
|
||||
set _MYCLASSPATH=%_EXTENSION_CLASSPATH%
|
||||
if not "%_BOOT_CLASSPATH%"=="" set _MYCLASSPATH=%_BOOT_CLASSPATH%;%_MYCLASSPATH%
|
||||
|
||||
set _ARGS=
|
||||
:loop
|
||||
rem Argument %1 may contain quotes so we use parentheses here
|
||||
|
@ -53,8 +50,8 @@ goto loop
|
|||
:exec
|
||||
set _PROPS=-Dscala.home="%_SCALA_HOME%" -Denv.classpath="%CLASSPATH%" -Dscala.tool.name="@name@" -Dscala.tool.version="@version@" @properties@
|
||||
|
||||
rem echo %_JAVACMD% @javaflags@ %_PROPS% -cp "%_MYCLASSPATH%" @class@ @toolflags@ %_ARGS%
|
||||
%_JAVACMD% @javaflags@ %_PROPS% -cp "%_MYCLASSPATH%" @class@ @toolflags@ %_ARGS%
|
||||
rem echo %_JAVACMD% -Xbootclasspath/a:%_BOOT_CLASSPATH% @javaflags@ %_PROPS% -cp "%_EXTENSION_CLASSPATH%" @class@ @toolflags@ %_ARGS%
|
||||
%_JAVACMD% -Xbootclasspath/a:%_BOOT_CLASSPATH% @javaflags@ %_PROPS% -cp "%_EXTENSION_CLASSPATH%" @class@ @toolflags@ %_ARGS%
|
||||
goto end
|
||||
|
||||
:version
|
||||
|
|
Loading…
Reference in New Issue