Skip to content

Commit 04f4291

Browse files
committed
[SPARK-6435] spark-shell --jars option does not add all jars to classpath
Modified to accept multiple jars in spark-shell.cmd.
1 parent 855cba8 commit 04f4291

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bin/spark-class2.cmd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ if not "x%JAVA_HOME%"=="x" set RUNNER=%JAVA_HOME%\bin\java
6464

6565
rem The launcher library prints the command to be executed in a single line suitable for being
6666
rem executed by the batch interpreter. So read all the output of the launcher into a variable.
67-
for /f "tokens=*" %%i in ('cmd /C ""%RUNNER%" -cp %LAUNCHER_CP% org.apache.spark.launcher.Main %*"') do (
67+
set LAUNCHER_OUTPUT=%temp%\spark-class-launcher-output.txt
68+
"%RUNNER%" -cp %LAUNCHER_CP% org.apache.spark.launcher.Main %* > %LAUNCHER_OUTPUT%
69+
for /f "tokens=*" %%i in (%LAUNCHER_OUTPUT%) do (
6870
set SPARK_CMD=%%i
6971
)
72+
del %LAUNCHER_OUTPUT%
7073
%SPARK_CMD%

0 commit comments

Comments
 (0)