Installation of the Java Development environment JDK on Ubuntu

Source: Internet
Author: User
Tags gz file

In the near future, learning a technology must run under Linux, so start learning how to use Linux.

In the installation of JDK difficulties encountered, the environment variable configuration is not successful, took a day to finish, special share out for your reference.

To install the JDK under Linux, proceed as follows

1: Download the JDK Package: This chapter uses a file with the suffix tar.gz (no installation required), such as jdk-7u67-linux-i586.tar.gz

2: Save the JDK file to the Linux directory: Use the mkdir command to generate the User/java directory from the console, and put the file under it

3: Unzip the tar.gz file: Through the console, enter User/java, execute $ tar zxvf jdk-7u67-linux-i586.tar.gz, unzip it

4: Configure Environment variables: Open the console, run sudo vi/etc/profile, insert the content you want to configure at the end, press ESC, enter (: Wq Save and exit)

Java_home=/home/gcs/user/java/jdk1.7.0_67path= $JAVA _home/bin: $PATHCLASSPATH =.: $JAVA _home/lib/dt.jar: $JAVA _home /lib/tools.jarexport Java_homeexport Pathexport CLASSPATH

5: Run $ source/etc/profile to make the configuration environment effective

6: Run $ java-version to see if it takes effect. If the JDK version number appears, install and configure the environment variable successfully

Installation of the Java Development environment JDK on 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.