title: NoClassDefFoundError com.apache.hadoop.fs.FSDataInputStream when execute spark-shell
body: <p>I've downloaded the prebuild version of spark 1.4.0 without hadoop (with user-provided Haddop). When I ran the spark-shell command, I got this error:</p>
  
  <pre><code>&gt; Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/fs/
  FSDataInputStream
          at org.apache.spark.deploy.SparkSubmitArguments$$anonfun$mergeDefaultSpa
  rkProperties$1.apply(SparkSubmitArguments.scala:111)
          at org.apache.spark.deploy.SparkSubmitArguments$$anonfun$mergeDefaultSpa
  rkProperties$1.apply(SparkSubmitArguments.scala:111)
          at scala.Option.getOrElse(Option.scala:120)
          at org.apache.spark.deploy.SparkSubmitArguments.mergeDefaultSparkPropert
  ies(SparkSubmitArguments.scala:111)
          at org.apache.spark.deploy.SparkSubmitArguments.&lt;init&gt;(SparkSubmitArgume
  nts.scala:97)
          at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:106)
          at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
  Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.fs.FSDataInputStr
  eam
          at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
          at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
          ... 7 more
  </code></pre>
  
  <p>I've searched on Internet, it is said that HADOOP_HOME has not been set yet in spark-env.cmd. But I cannot find spark-env.cmd in the spark installation folder.
  I've traced the spark-shell command and it seems that there are no HADOOP_CONFIG in there. I've tried to add the HADOOP_HOME on environment variable but it still give the same exception.</p>
  
  <p>Actually I don't really using the hadoop. I downloaded hadoop as a workaround as suggested in <a href="https://stackoverflow.com/questions/19620642/failed-to-locate-the-winutils-binary-in-the-hadoop-binary-path">this question</a></p>
  
  <p>I am using windows 8 and scala 2.10. </p>
  
  <p>Any help will be appreciated. Thanks.</p>