Installing JDK under Linux

Source: Internet
Author: User

Installing the JDK on Linux is one of the most essential technologies for programmers who choose to develop applications under Linux, and here I use Ubuntu demo to install Jdk1.7 under Linux using the command line (graphical interface is not considered!!!). )

First step: Install the virtual machine
Step Two: Install Ubuntu
Step three: Install the JDK

Resources: Ubuntu 10 (my 32-bit machine, everyone attention to the seat)
Linux ubuntu 2.6.35-22-generic #33-ubuntu SMP Sun Sep 20:34:50 UTC i686 gnu/linux

Jdk1.7 version
Jdk-7u9-linux-i586.tar.gz
(1), JDK people generally like to use it as a system application, so generally everyone likes to set up a new folder under the/usr/--java for storing the path of the Java installation
Action command: sudo mkdir/usr/java

(3), unzip the jdk-7u9-linux-i586.tar.gz and place it in the/usr/java directory and then rename it to jdk1.7
Extract command: sudo tar-zxvf-r jdk-7u9-linux-i586.tar.gz//usr/java
Rename command: sudo mv jdk1.7.0_09 jdk1.7

(4), configure environment variables
Go to config file: sudo gedit/etc/profile
Add a configuration file before Umask 022

     export JAVA_HOME=/usr/java/jdk1.7     export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar     export PATH=$PATH:$JAVA_HOME/bin     022

(5), and finally restart the client input java-version the message that appears is the success

  nagi@ubuntu:~$ java -version    "1.7.0_09"    Java(TMSERuntimeEnvironment1.7.0_09-b05)    JavaHotSpot(TMClientVM23.5-b02, mixed mode)    nagi@ubuntu:~$

Installing JDK under Linux

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.