Download page: http://www.oracle.com/technetwork/java/javase/archive-139210.html
Open "Java SE 7" and open "Java SE development Kit 7u80", select "Accept License Agreement" agree Oracle Binary Code License Agreement for Ja VA SE, click on the response version to start downloading.
Finally, enter the following command:
1# Create JDK Catalogue,-p To create multiple entries2$sudo mkdir-p/opt/Java3 4 # Unzip the JDK to the specified catalog5$sudoZXVF ~/Download/jdk-7u80-linux-x64.Tar. gz-c/opt/java/6 7# If you do not install Vim, you can use Baidu orsudoGedit/etc/profile ", the following is valid for all user, only for the former user is"sudoVim ~/. BASHRC "8$sudovim/etc/ Profile9 Ten# The following content Shift + Insert Stickers. OneExport JAVA_HOME=/OPT/JAVA/JDK1.7. 0_80 AExport JRE_HOME=/OPT/JAVA/JDK1.7.0_80/JRE -Export classpath=.: $JAVA _home/lib: $JRE _home/Lib: $CLASSPATH -Export path= $JAVA _home/bin: $JRE _home/Bin: $JAVA _home: $PATH the -# General Changes/etc/profile file, it needs to be re-activated before it takes effect, if only when the previous end is in effect ... -$ source/etc/ Profile - + # See if the JDK environment changes are configured successfully -$ java-version +Java version"1.7.0_80" AJava (TM) SE Runtime Environment (build1.7.0_80-B15) atJava HotSpot (TM) --bit Server VM (build24.80-B11, Mixed mode)
"Linux Ubuntu" installation Java SE development Kit (JDK) and configure environment changes