Install the Scala2.10.4 plug-in under Eclipse
Spark compilation is currently based on Scala 2.10.4, and the installation of the Scala plug-in version is also 2.10.4, otherwise eclipse will report an error of incompatibility between the spark jar package and the scala version.
Different Eclipse versions of Scala IDE for Eclipse correspond to different plug-ins.
Download address: http://scala-ide.org/download/prev-stable.html
Eclipse 3.84.3 (Juno and Kepler) For Scala 2.11.2 http://download.scala-ide.org/sdk/helium/e38/scala211/stable/siteFor Scala 2.10.4 http://download.scala-ide.org/sdk/helium/e38/scala210/stable/site
Select Eclipse4.2 Juno to install the plug-in
Select Help- > Install new Software in Eclipse
After adding the plug-in download link to install, you will be prompted to restart Eclipse
Create a new Scala Project project Test to test whether it can be used correctly. In addition to loading JRE Library, the related libray of Scala 2.10.4 will also be loaded in the project project.
Object Testd {def main (args: Array [String]): Unit = {val array = Array ("scala 2.10.4", "spark 1.1.0") array.foreach (println)}}
Run like a Java program, compiled into a class file and run in JVM
Scala 2.10.4spark 1.1.0