summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2016-12-15 09:24:38 +1000
committerGitHub <noreply@github.com>2016-12-15 09:24:38 +1000
commita9802c317a72925838bcd5c53a5919f75b577caa (patch)
tree0429eb52c32ed92373a54e5347ecf8e8eca30fb3 /src
parentb91b415b4fccfc46520dcd3f128b4b09d19d74f0 (diff)
parent60ea98e412de0a2a9f631a5b4b048107e0b251f0 (diff)
downloadscala-a9802c317a72925838bcd5c53a5919f75b577caa.tar.gz
scala-a9802c317a72925838bcd5c53a5919f75b577caa.tar.bz2
scala-a9802c317a72925838bcd5c53a5919f75b577caa.zip
Merge pull request #5588 from retronym/ticket/10098
S-10098 Fix regression in Unix runner script with JAVA_HOME unset
Diffstat (limited to 'src')
-rwxr-xr-xsrc/compiler/scala/tools/ant/templates/tool-unix.tmpl13
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