diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2016-12-08 09:15:01 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2016-12-08 09:15:01 +1000 |
commit | 60ea98e412de0a2a9f631a5b4b048107e0b251f0 (patch) | |
tree | 4a13ea063837487c9cb2a49311722e0d7e879824 /src/compiler/scala/tools/ant | |
parent | 5ed47bca1ff286bec31098cb9eceba319830b1fc (diff) | |
download | scala-60ea98e412de0a2a9f631a5b4b048107e0b251f0.tar.gz scala-60ea98e412de0a2a9f631a5b4b048107e0b251f0.tar.bz2 scala-60ea98e412de0a2a9f631a5b4b048107e0b251f0.zip |
S-10098 Fix regression in Unix runner script with JAVA_HOME unset
Rework bfa7ade0 to unconditionally set the system property with the
contents of the bootclasspath, rather than trying to do this only
for JVM 9+.
The attempted JVM version detection code assumed JAVA_HOME was set,
which isn't always the case.
Diffstat (limited to 'src/compiler/scala/tools/ant')
-rwxr-xr-x | src/compiler/scala/tools/ant/templates/tool-unix.tmpl | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/compiler/scala/tools/ant/templates/tool-unix.tmpl b/src/compiler/scala/tools/ant/templates/tool-unix.tmpl index b5a238f7be..70ae9af444 100755 --- a/src/compiler/scala/tools/ant/templates/tool-unix.tmpl +++ b/src/compiler/scala/tools/ant/templates/tool-unix.tmpl @@ -197,14 +197,11 @@ fi # to java to suppress "." from materializing. if [[ "$usebootcp" == "true" ]]; then classpath_args=("-Xbootclasspath/a:$TOOL_CLASSPATH" -classpath "\"\"") - # Note that the version numbers go 1.7, 1.8, 9, 10, ... - java_release="$(cat $JAVA_HOME/release | grep JAVA_VERSION)" - if [[ ! "$java_release" =~ JAVA_VERSION=\"1\. ]]; then - # Java 9 removed sun.boot.class.path, and the supposed replacement to at least see - # the appended boot classpath (jdk.boot.class.path.append) is not visible. - # So we have to pass a custom system property that PathResolver will find. - classpath_args+=("-Dscala.boot.class.path=$TOOL_CLASSPATH") - fi + # Java 9 removed sun.boot.class.path, and the supposed replacement to at least see + # the appended boot classpath (jdk.boot.class.path.append) is not visible. + # So we have to pass a custom system property that PathResolver will find. + # We do this for all JVM versions, rather than getting into the business of JVM version detection. + classpath_args+=("-Dscala.boot.class.path=$TOOL_CLASSPATH") else classpath_args=(-classpath "$TOOL_CLASSPATH") fi |