Java Development Environment under UbuntuLinux System

Source: Internet
Author: User
Linux: Linuxx64/Ubuntu14.04JavaJDK version: jdk-8u65-linux-x64.tar.gz1. Go to the Oracle official website to download the latest version of JavaJDK: http://www.oracle.com/technetwork/java/javase/downloads/index.html, download to downloadsfolder. 2. Create a file in a proper path

Operating System: Linux x64/Ubuntu 14.04

Java JDK version: jdk-8u65-linux-x64.tar.gz

1. Go to the Oracle official website to download the latest version of Java JDK: http://www.oracle.com/technetwork/java/javase/downloads/index.html, and download it to the downloadsfolder.

2. Create a folder in the appropriate path to store Java JDK. In this example, create a new JVM sub-folder under the/opt directory. The operations are as follows:

Open Terminal (the last is T1) and enter:

Cd/opt # Go to the opt directory
Sudo mkdir jvm # create a jvm folder
Ls # display successfully created jvm folder
Cd jvm # enter the jvm folder

3. Copy the downloaded JDK compressed package to the jvm directory. The operations are as follows:

Create another Terminal window (T2) and enter:

Cd Downloads # enter the Downloads folder
Ls # display the downloaded JDK file,
Sudo cp jdk-8u65-linux-x64.tar.gz/opt/jvm # copy the file to the newly created jvm folder (here change the file name to your corresponding JDK version, later the same)
Sudo rm jdk-8u65-linux-x64.tar.gz # Delete the installation package in the local directory (optional)

4. Unzip and install Java JDK and configure environment variables. The operations are as follows:

Return to the first Terminal (T1) and enter:

Ls # display the copied JDK installation package
Sudo tar-zxvf jdk-8u65-linux-x64.tar.gz # unzip the installation package
Ls # display the decompressed JDK folder and the original installation package
Sudo rm jdk-8u65-linux-x64.tar.gz # delete original installation package
Sudo gedit/etc/profile # Open the profile file under the etc directory

5. configure global environment variables. The operations are as follows:

Add the JDK installation path at the end of the opened profile document (Please confirm carefully ):

# Set java environment
Export JAVA_HOME =/opt/jvm/jdk1.8.0 _ 65
Export JRE_HOME =$ {JAVA_HOME}/jre
Export CLASSPATH =.: $ JAVA_HOME/lib: $ JRE_HOME/lib: $ CLASSPATH
Export PATH = $ JAVA_HOME/bin: $ JRE_HOME/bin: $ PATH

6. Save and close the document. (Note: You can also run the vim command to edit etc/profile, open the command: sudo vim/etc/profile, and press Key to enter the editing mode, Key to exit the editing mode, and then press ":" and then enter "wq! "Save and exit; enter" q! "Do not save and Exit)

7. Enable configuration and verify. In Terminal, enter:

Java-version

8. If the display effect is similar to the following, the operation is successful:

Java version "1.8.0 _ 65"
Java (TM) SE Runtime Environment (build 1.8.0 _ 65-b17)
Java HotSpot (TM) 64-Bit Server VM (build 25.65-b01, mixed mode)

Build http://www.linuxidc.com/Linux/2015-01/111974.htm of Java Development Environment under Ubuntu 14.04

Install JDK 7 (with Clojure download) http://www.linuxidc.com/Linux/2012-10/71557.htm under Ubuntu

Install JDK1.7 http://www.linuxidc.com/Linux/2012-06/62239.htm in Ubuntu 12.04

CentOS6.3 install JDK and environment configuration http://www.linuxidc.com/Linux/2012-09/70780.htm

Ubuntu14.04 64-bit installation JDK1.7 http://www.linuxidc.com/Linux/2015-01/111102.htm

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-12/126928.htm

Related Article

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.