Skip to content

Commit 89e39e7

Browse files
committed
review commit
1 parent c2a6f04 commit 89e39e7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bin/spark-class

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,14 @@ else
109109
fi
110110
JAVA_VERSION=$("$RUNNER" -version 2>&1 | grep 'version' | sed 's/.* version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q')
111111

112+
# SPARK-3936: scala does not assume use of the java classpath, so we need to add the "-Dscala.usejavacp=true"
113+
OUR_JAVA_OPTS="$OUR_JAVA_OPTS -Dscala.usejavacp=true"
114+
112115
# Set JAVA_OPTS to be able to load native libraries and to set heap size
113116
if [ "$JAVA_VERSION" -ge 18 ]; then
114117
JAVA_OPTS="$OUR_JAVA_OPTS"
115118
else
116-
JAVA_OPTS="-Dscala.usejavacp=true -XX:MaxPermSize=128m $OUR_JAVA_OPTS"
119+
JAVA_OPTS="-XX:MaxPermSize=128m $OUR_JAVA_OPTS"
117120
fi
118121
JAVA_OPTS="$JAVA_OPTS -Xms$OUR_JAVA_MEM -Xmx$OUR_JAVA_MEM"
119122

0 commit comments

Comments
 (0)