One of the essential skills of a Java software engineer: installing JDK under Linux
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 think of it as a system application, so generally everyone likes to create a new folder under/usr/----Java is used to store the Java installation path
Action command: sudo mkdir/usr/java
(2), the downloaded JDK mounted, (Mount resources: Virtual Machine-"Settings-" option-"shared files always open-" Add the resources that need to be mounted, and finally in the virtual machine/mnt/hgfs/ can view attached resources) Here, I put my jdk-7u9-linux-i586.tar.gz in.
(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
Enter configuration file: Vi/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
Umask 022
(5), and finally restart the client input java-version the message that appears is the success
[email protected]: ~$ java-version
Java Version "1.7.0_09"
Java (TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot (TM) Client VM (build 23.5-b02, Mixed mode)
[email protected]: ~$
Install jdk--JDK installation under Linux