First step: Java settings
The detection method has been explained earlier and is no longer described here.
If you are also installing, you can refer to our Java Development environment configuration.
Next, we can download the Scala binary package from the Scala website address http://www.scala-lang.org/downloads (at the bottom of the page), this tutorial we will download the 2.11.7 version, as shown in:
After downloading, double-click the MSI file, step by step installation, the installation process you can use the default installation directory.
After you install Scala, the system automatically prompts you to click Finish to complete the installation.
Right-click My Computer, and then tap properties to go to the page. To start configuring environment variables, right-click on "My Computer"--"properties"--"Advanced system Settings"--"Environment variables",
Set the Scala_home variable: Click New, enter in the Variable Name field:scala_home: Variable value in the column input:D:\Program Files\scala is the installation directory of SCALA, according to the individual situation is different , if installed on the C drive, change "D" to "C".
Set the PATH variable: Locate "path" under the system variable and click Edit. Add the following path at the front of the "Variable Value" column:%scala_home%\bin;%scala_home%\jre\bin;
Note: the following semicolon ; don't miss out.
Set the Classpath variable: find "Classpath" under System variables, click Edit, if not, click New:
- "Variable name": ClassPath
- "Variable value":.; %scala_home%\bin;%scala_home%\lib\dt.jar;%scala_home%\lib\tools.jar.;
Note:"Variable Value" at the top of the.; Don't miss out. Finally, click OK.
Check that the environment variable is set: Bring up the "cmd" check. Click Start, enter CMD in the input box, then "enter", type Scala, and enter, such as environment variable settings OK, you should be able to see this information.
The following lists the directories that are placed by different systems (as a reference):
System Environment |
variables |
Value (example) |
Unix |
$SCALA_HOME |
/usr/local/share/scala |
|
$PATH |
$PATH:$SCALA_HOME/bin |
Windows |
%SCALA_HOME% |
c:\Progra~1\Scala |
|
%PATH% |
%PATH%;%SCALA_HOME%\bin |
Install Scala on window