1. Go to Sun's official website to download
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.htmlSelect accept license and select JDK download for your model.
2, unzip the file, modify the file name
## first enter the administrator privileges $ sudo -i## then create a directory, extract the file $ mkdir /usr/lib/jvm$ tar zxvf Jdk-7u65-linux-i586.tar.gz -C /usr/lib/jvm$ cd /usr/lib/jvm## The following command is used to create a soft connection $ ln -s /usr/lib/jvm/jdk1. 7.0_65 /usr/lib/jvm/jdk1.73. Add the environment variable at the end of the bashrc configuration file
$ vim ~/.bashrcAdd the following content
Export JAVA_HOME=/usr/lib/jvm/jdk1.7export JRE_HOME=${JAVA_HOME}/jre export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib export PATH=${JAVA_HOME}/bin:$ PATH4, configure the default JDK version
update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7/bin/java 300 update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7/bin/javac 300 update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.7/bin/jar 300 Update-alternatives --install /usr/bin/javah javah /usr/lib/jvm/jdk1.7/bin/javah 300 update-alter Natives --install /usr/bin/javap javap /usr/lib/jvm/jdk1.7/bin/javap 300Then execute
update-alternatives --config javaupdate-alternatives --config javacupdate -alternativesIf you are installing the JDK for the first time, you will be prompted
There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java/bin/java Configuration.If it is not a first time installation, there will be different versions of the JDK option.
5, Test
$ java -versionjava version "1.7.0_21"Java(TM) SE Runtime Environment (build 1.7.0_65-b17)Java HotSpot(TM) Server VM (build 24.15-b04, mixed mode)
The purpose of writing this article is to make yourself a linux environment later, no need t
All files in the Linux system are shielded by the virtual file system (VFS) mechanism. Users
The Windows 7 and Ubantu dual system are installed on the computer. Since the Linux system
1, need to upload or download, you need to use the rz and sz commands. If you do not have th
Dynamic routing network infrastructure of linux
Centos7 modify SSH port number
PCI device driver development under Linux
Learning of redirected output in Linux
Remove duplicate data from file
Linux folder file creation, deletion
Find the difference between find, locate, whereis, which, type in linux
The semaphore implementation of the Linux kernel source code
Picture management is handy, a comprehensive understanding of Win8 picture library
How to solve Win7 system Explorer.exe error
Win7 system can not create system restore point
Win10 desktop to add a detailed method of drawing /scanning and other gadgets
Windows10 gesture function use operation detailed
Simple and practical Windows 7 system God mode explores
Windows 2000 Internet Information Service Installation
How to turn off the keyboard prompt tone under Win8 system
How do I turn off the prompt message in the Action Center on Windows 8?