1. Introduction
Here is the main point, how to install the jdk1.8,rpm in the way of the compression package Ubuntu1204 the direct operation of the line.
2. Steps
2.1 Downloads
Address: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html, download 64-bit compression package in Linux environment, Jdk-8u45-linux-x64.tar.gz
2.2 Uploads
Can be through the Xftp tool, copy files to the Linux environment, here I put in my own built directory, note that the upload may prompt no permissions, give the folder write permission on the line
2.3 Decompression
tar -zxvf jdk-8u45-linux-x64.gz# The directory after decompression is:/app/programs/jdk1. 8. 0_45
2.4 Configuring environment variables
VI /etc/profile
At the bottom of the file, add the following code:
#set java environmentexport java_home=/app/programes/jdk1. 8 . 0_45export jre_home=${java_home}/jreexport CLASSPATH=.:${java_home}/lib:${jre_home}/ Libexport PATH=${java_home}/bin: $PATH
Save, exit.
2.5 Make the configuration file effective (sometimes does not work after execution, it is recommended to restart)
Source/etc/profile
2.6 Testing
Java-version
If the version information of the JDK is output, the description succeeds.
Virtual Machine Linux----Ubuntu1204----installation jdk1.8