Install Scala and install the IntelliJ Scala plugin (Plugin) in Ubuntu environment

Source: Internet
Author: User

I. Introduction of Scala

1. Processing big data with spark

This is one of the main applications of Scala, and Spark is also written in Scala.

2. Script language version of Java
You can write Scala scripts directly, or you can use Scala directly in. Sh.

3. Replace Java
Scala's programming style is more concise and certainly less readable, but the Java language has its advantages.

Ii. installation of Scala

1, the first thing to note is:Scala version of Java is required, too new or too old version will cause a variety of problems, so before downloading to consider the corresponding Java version of Scala or Java corresponding Scala version

This is the case with the Scala 2.11.8 version, the Java version of this machine is 1.8.0_181

2, through the official website download: https://www.scala-lang.org/download/2.11.8.html

Because of the domestic network, the large probability of the official website can not be downloaded, at this time through the mirror site to download: http://distfiles.macports.org/scala2.11/

3. Get scala-2.11.8.tgz file after download

Unzip the downloaded Scala file into the/usr/local folder

1 sudo tar -xzvf scala-2.11. 8. Tgz-c/usr/local  

4, rename, put the extracted files into the Scala file

1 $ cd/usr/23sudomv scala-2.11. 8 Scala

5. Add Environment variables

1 sudo vim/etc/profile

  在最后添加下面内容 

1 export scala_home=/usr/local/2 export path= $SCALA _home/bin: $PATH

Make configuration effective

1 source/etc/profile

6, check the version, test whether the installation is successful

1 $ scala-version
Third, install IntelliJ Scala plugin

1, through the official Plugins library installation

Open IntelliJ Idea and click File->settings->plugins in the top bar to open the following screen:

Click the browse repositories below to search for Scala and then sort the search results by the number of downloads to see the most downloaded official plugins:

Installation can be done.

2. manual installation of Scala plugin

Due to domestic network problems, the approximate rate is not available through the official plugin library to install Scala plugin, so manual installation is required.

1) First, to see the version of IntelliJ idea, click Help->about in the top bar:

You can learn that IntelliJ idea is in the 2018.1.6 version.

2) Download the corresponding version of Scala plugin on the official website at: Http://plugins.jetbrains.com/plugin/1347-scala, open and click Previous updates to find the desired version:

After downloading, get the corresponding. zip file.

3) Open file->settings->plugins->install plugin from diskin the top bar and select the downloaded. zip file.

Reference documents:

1. The first step in learning Big data-building the Scala development environment and using INTELLIJ idea to develop Scala programs

Install Scala and install the IntelliJ Scala plugin (Plugin) in Ubuntu environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.