Skip to content

Commit abb6fa4

Browse files
committed
move usejavacp opt to spark-shell
1 parent 89e39e7 commit abb6fa4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bin/spark-class

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,6 @@ 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-
115112
# Set JAVA_OPTS to be able to load native libraries and to set heap size
116113
if [ "$JAVA_VERSION" -ge 18 ]; then
117114
JAVA_OPTS="$OUR_JAVA_OPTS"

bin/spark-shell

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ source "$FWDIR"/bin/utils.sh
4545
SUBMIT_USAGE_FUNCTION=usage
4646
gatherSparkSubmitOpts "$@"
4747

48+
# SPARK-4161: scala does not assume use of the java classpath, so we need to add the "-Dscala.usejavacp=true"
49+
SPARK_SUBMIT_OPTS="$SPARK_SUBMIT_OPTS -Dscala.usejavacp=true"
50+
4851
function main() {
4952
if $cygwin; then
5053
# Workaround for issue involving JLine and Cygwin

0 commit comments

Comments
 (0)