[ 
https://issues.apache.org/jira/browse/TOREE-399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16123334#comment-16123334
 ] 

Jean-Baptiste edited comment on TOREE-399 at 8/11/17 1:32 PM:
--------------------------------------------------------------

Here come a bat file I created to run toree on Windows if it can help (you 
still need to modify the kernel.json files to run the bat file instead of the 
run.sh script):

@echo off
setlocal

SET parent=%~dp0
FOR %%a IN ("%parent:~0,-1%") DO SET PROG_HOME=%%~dpa

IF "%SPARK_HOME%" == "" GOTO endprog
ECHO "Starting Spark Kernel with SPARK_HOME=%SPARK_HOME%"

FOR %%F IN (%PROG_HOME%lib\toree-assembly-*.jar) DO (
 SET TOREE_ASSEMBLY=%%F
 GOTO tests
)

:tests
    @REM disable randomized hash for string in Python 3.3+
    @REM SET TOREE_ASSEMBLY=%TOREE_ASSEMBLY:\=\\%
    SET PYTHONHASHSEED=0

IF "%SPARK_OPTS%" == "" GOTO toreeopts
SET SPARK_OPTS=%__TOREE_SPARK_OPTS__%

:toreeopts
    IF "%TOREE_OPTS%" == "" GOTO runspark
    SET TOREE_OPTS=%__TOREE_OPTS__%

:runspark
    ECHO %SPARK_HOME%\bin\spark-submit %SPARK_OPTS% --class 
org.apache.toree.Main "%TOREE_ASSEMBLY%" %TOREE_OPTS% %*
    %SPARK_HOME%\bin\spark-submit %SPARK_OPTS% --class org.apache.toree.Main 
%TOREE_ASSEMBLY% %TOREE_OPTS% %*
    GOTO :eof

:endprog
    echo "SPARK_HOME must be set to the location of a Spark distribution!"
GOTO :eof

I'm facing the same issue ('*_object scala in compiler mirror not found_*') and 
wonder if the Apache Spark jars in $SPARK_HOME should not be added to the 
classpath.


was (Author: jbmarcille):
Here come a bat file I created to run toree on Windows if it can help (you 
still need to modify the kernel.json files to run the bat file instead of the 
run.sh script).

I'm facing the same issue ('*_object scala in compiler mirror not found_*') and 
wonder if the Apache Spark jars in $SPARK_HOME should not be added to the 
classpath.

> Make Spark Kernel work on Windows
> ---------------------------------
>
>                 Key: TOREE-399
>                 URL: https://issues.apache.org/jira/browse/TOREE-399
>             Project: TOREE
>          Issue Type: New Feature
>         Environment: Windows 7/8/10
>            Reporter: aldo
>         Attachments: run.bat
>
>
> After a successful install of the Spark Kernel the error: "Failed to run 
> command:" occurs when from jupyter we select a Scala Notebook.
> The error happens because the kernel.json runs 
> C:\\ProgramData\\jupyter\\kernels\\apache_toree_scala\\bin\\run.sh which is 
> bash shell script and hence cannot work on windows.
> Can you give me some direction to fix this, and I will implement it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to