title: Unable to locate Spark Jar: Java ClassNotFoundException
body: <p>I am installing Spark on Ubuntu server.I have followed all the steps and it even said BUILD SUCCESSFUL in the end but when I am running <code>./bin/spark-shell</code> it is giving me this error.<a href="https://i.stack.imgur.com/T6kgS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T6kgS.png" alt="enter image description here"></a></p>
  
  <p>It probably means that it is not able to locate .jar file which has location of ./spark-1.4.1/launcher/src/main/java/org/apache/spark/launcher which has all the java files like Main.java.</p>
  
  <p>Also there is nothing in $CLASSPATH and $SPARK_CLASSPATH. I installed Spark in Linux and Mac before and was not faced with this problem. Can someone tell me what can be the problem here? Probably I need to specify classpath or some environment variable to point to a jar which contains all the class files.</p>
  
  <p>My JAVA_HOME points to /jvm/java-6-openjdk-amd64/jre. Is there any problem with this? </p>
  
  <p>EDIT: 
  I tried few more things. I wrote a shell script to find out the jar file which contains the org/apache/spark/launcher/Main.class file and found out that it is located at : <code>/usr/local/src/spark/spark-1.4.1/launcher/target/spark-launcher_2.10-1.4.1.jar</code>. I changed my CLASSPATH and SPARK_CLASSPATH to the same location and tried running Spark. It gave me same error. </p>
  
  <p>I also changed ./conf/spark-env.sh to incorporate different SPARK_CLASSPATH. It also didn't work. </p>