Install JDK and environment variable configuration in Ubuntu

Source: Internet
Author: User

Install JDK and environment variable configuration in Ubuntu

Objective: To install JDK and environment variable configuration in Ubuntu

1. getconf LONG_BIT: view the number of system digits and download the corresponding jdk.
My Ubuntu system is 32-bit, so the downloaded jdk is: jdk-8u77-linux-i586.gz.
And stored in the/home/injavawetrust/software Directory.

2. Create a directory/usr/lib/jvm to put the downloaded and decompressed package in this directory.
Cd/usr/lib
Sudo mkdir jvm

3. decompress and put the decompressed jdk folder in the/usr/lib/jvm directory.
Cd/home/injavawetrust/software
Sudo tar zxvf jdk-8u77-linux-i586.gz-C/usr/lib/jvm

4. Go to the/usr/lib/jvm directory.
Cd/usr/lib/jvm

5. Rename the decompressed jdk folder to java1.8.
Sudo mv jdk1.8.0 _ 77 java1.8

6. first enter the vi editor, and then enter the following command
Vi ~ /. Bashrc
The command entered in the open file is as follows:


 
7. Run the following command:
Source ~ /. Bashrc

8. Test
Java-version

The following information is displayed:
Java version "1.8.0 _ 77"
Java (TM) SE Runtime Environment (build 1.8.0 _ 77-b03)
Java HotSpot (TM) Client VM (build 25.77-b03, mixed mode)

Jdk is installed successfully.

9. Test the written java code.

Install JDK 1.8.0 _ 25 on Ubuntu 14.04 and configure Environment Variables

Build a JDK environment using CentOS

Install JDK 1.8.0 _ 25 on Ubuntu 14.04 and configure Environment Variables

Install Oracle JDK 14.04 on Ubuntu 1.8 LTS

CentOS6.3 install JDK and environment Configuration

Install JDK 8 on Ubuntu 14.04

Install JDK graph analysis in Ubuntu

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.