Search code examples
javashellapache-sparkhadooppyspark

ERROR : spark-shell \Spark\bin\..' was unexpected at this time


I`m using on Windows(10) machine. I want to install Apache Spark in my machine.
Official download page here.

Article I followed to complete the Apache Spark installation here.

What I did :
Installed/added java, spark and hadoop and added to the path as well.
enter image description here
Created required system variables which are : SPARK_HOME, JAVA_HOME, HADOOP_HOME enter image description here enter image description here

NOTE : I dont have bin in the provide value of the SPARK_HOME.

After doing all the required steps.
The command I used is spark-shell.

Getting the following error :
enter image description here

While solving aforementioned error, I tired this article also, though nothing got changed : https://mytechnologythought.blogspot.com/2018/08/spark-shell-java-was-unexpected-at-this.html

Please can anyone from the community tell me how to fix it !!


Solution

  • later I digged more about it & let me share what worked for me.

    The article I was using to install Apache Spark is click me.

    While working on finding the solution, I came across this article. I did the mentioned steps, though it didnt work.

    Later, just for the trial.
    What I did is I moved all the required folder in directly to C: rather having them in some sub-director(whose names are having whitespaces in them, like: Program Files).

    enter image description here

    Later update all the System variables with the right paths.

    enter image description here enter image description here

    Then I restarted the laptop.

    VOILA, it worked !!!!!!

    enter image description here