First, Scala is the combination of functional programming and object-oriented programming language, what are the characteristics of these two programming?
A: Functional programming excels at numerical calculations, and object-oriented programming is particularly well suited for large engineering or project organizations, and for team collaboration.
Second, Scala the characteristics
Scala elegant structure, sophisticated computing, expressive
Third, Scala What resources are needed for installation?
Java , recommended installation Java8 (Java7 can also )
Support Scala 2.10.* above (can be installed 2.10.4 , Http://scala-lang.org/download )
Iv. Setting environment variables (System variables):
( 1 java_home and < Span style= "FONT-FAMILY:CALIBRI;" >scala_home
determine that you have added JAVA and the SCALA the installation directory (the variable values are C:\Program files\java\jdk1.7.0_71 and the C:\Program Files (x86) \scala )
( 2 ) PATH
%java_home%\bin and %scala_home%\bin
in the PATH added in SCALA of the bin directory, use it in any directory SCALA Command
( 3 ) CLASSPATH
determine the value of the variable to add %java_home%\lib\dt.jar;%java_home%\lib\tools.jar
V. To view the version of the command:
Java-version
Scala
Vi. Use of IDE integrated development environment to operate
1 idea idea spark idea to develop,
because it's JAVA and the SCALA support is particularly good, there are other support very good
2 , Scalaide ( For Eclipse ), download, unzip can be used
It is highly recommended for beginners Scalaide ( For Eclipse )
Vii. establishment of the first procedure:
1 , create a project
Name: scalainaction
2 , create a package in the source code (easy to manage)
in the src set up below Packet ,
Name: Com.dt.scala.hello
3 , create the object (after creating the package, you can write the program inside)
Name: Helloscala
Select the Public static void Main (string[] args) "
( Scala Object is a Scala class, we are the static object in the Scala Object in Possession Scala of the Main method of Entry)
Run as
information from :D t Big Data Dream Factory public account:dt_spark
This article is from the "Lisunwei" blog, make sure to keep this source http://110095.blog.51cto.com/100095/1678941
DT Big Data DreamWorks-scala study notes (1): Scala development environment building and HelloWorld analysis