64-bit Ubuntu11.10 installation and configuration of JavaJDK Environment Variables

Source: Internet
Author: User
0.1 -- Download JAVAJDK: JDK

0.1 -- Download

Java jdk: http://www.oracle.com/technetwork/java/javase/downloads/index.html

Click download jdk. Here is the DOWNLOAD

Linux x64-Self Extracting Installer // jdk-6u31-linux-x64 // 81.62 MB

Download and save using FireFox

0.2 -- Installation

You need to create a directory: sudo mkdir jvm. The downloaded jdk is placed in the "download folder" under "Main folder"

Go to the/usr/lib/jvm directory and copy jdk to the current directory (if you cannot copy it directly, run the terminal command sudo cp jdk-6u31-linux-x64.bin/usr/lib/jvm ), run this terminal command in the "Download" folder.

Run the sudo chmod u + x jdk-6u31-linux-x64.bin to add executable permissions to JDK

Run sudo./jdk-6u31-linux-x64.bin to install JDK to the current directory

0.3 -- Configuration

Run sudo gedit/etc/environment to add the configuration.

PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /usr/lib/jvm/jdk1.6.0 _ 31/bin"

CLASSPATH = ".:/usr/lib/jvm/jdk1.6.0 _ 31/bin/lib"

JAVA_HOME = "/usr/lib/jvm/jdk1.6.0 _ 31"

Sudo update-alternatives -- install/usr/bin/java/usr/lib/jvm/jdk1.6.0 _ 31bin/java 300

Sudo update-alternatives -- install/usr/bin/javac/usr/lib/jvm/jdk1.6.0 _ 31/bin/javac 300

Then sudo update-alternatives -- config java configuration preferences, and enter a number for selection.

Execute java-version to view

Java version "1.6.0 _ 31"

Java (TM) SE Runtime Environment (build 1.6.0 _ 31-b04)

Java HotSpot (TM) 64-Bit Server VM (build ipv6-b01, mixed mode)

The above information is displayed. OK

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

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.