Java and Scala environment configuration in Linux

Source: Internet
Author: User

Java and Scala environment configuration in Linux

Recently, I have been studying a project on "natural language processing". In this project, we need to use Spark for programming. The Spark kernel is developed by the Scala language. Therefore, before using Spark, We must configure Scala and Scala runs on the JVM. Therefore, before configuring Scala, configure JDK first. The following is my personal summary.

I am a virtual machine on Windows 7, and the virtual machine system is CentOS7. After creating a virtual machine, it will bring an OpenJDK. My version is like this:

And decompress the package to the/Downloads directory. Go to the/etc/profile. d directory, create a path. sh script file, and open and configure the environment variables, such:

In the/etc/profile. d directory, type the source path. sh command to make the configuration take effect.

However, after the configuration is successful, type java-version in the console and you will still get the information in the first figure. After that, you need to uninstall the built-in JDK before configuring JDK.

Enter java in the console, as shown in:

But do not know this, only know that the Java development environment has been configured, So began to find the corresponding version of Scala, I downloaded the scala-2.10.5.tgz, and decompress in the/Downloads directory. Go to the/etc/profile. d directory, open the path. sh file, and configure Scala environment variables, as shown in:

In the/etc/profile. d directory, type the source path. sh command to make the configuration take effect.

Enter scala-version and scala in the console and you will get the content in the following two figures:

Now, the Java and Scala environment has been configured!

This article is prepared by the author in person and does not contain any plagiarism. If you need to repost or reference it, please indicate the author.

The technical blog will be continuously modified. Thank you for your comments!

Use IntelliJ IDEA to write Scala and run it in Spark

Scala Programming complete Chinese version PDF

Quick learning Scala (Chinese complete scan version) PDF

Install Scala 2.10.x in Ubuntu

Spark1.0.0 Deployment Guide

Install Spark0.8.0 in CentOS 6.2 (64-bit)

Introduction to Spark and its installation and use in Ubuntu

Install the Spark cluster (on CentOS)

Hadoop vs Spark Performance Comparison

Spark installation and learning

Spark Parallel Computing Model

Scala details: click here
Scala: click here

This article permanently updates the link address:

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.