Jdk:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/53/9C/wKiom1RsOyeDIfL2AAIWAd0YY3o476.jpg "title=" Screenshot2442.jpg "alt=" Wkiom1rsoyedifl2aaiwad0yy3o476.jpg "/>
Select 64-bit or 32-bit downloads based on the Linux system version, and the official version is available in RPM and tar.gz two versions.
Installation:
[Email protected] cdrom]# RPM-IVH jdk-8u25-linux-x64.rpm
Configuring the JDK environment variables
Method One: Set the variable under the shell (this method is only valid for the current shell, and will need to be reconfigured if you open another shell)
Export java_home=/usr/java/jdk1.7.0_40/
Export path= $JAVA _home/bin: $PATH
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
(where only export Path=/usr/java/jdk1.7.0_40/bin is configured: $PATH can)
Method Two: Modify the/etc/profile file (this method once and for all, set once, valid for all users)
Open the/etc/profile file with the Vim editor and add the definition of the environment variable at the end of the file
java_home=/usr/java/jdk1.8.0_25/
Path= $JAVA _home/bin: $PATH
Classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export Java_home
Export PATH
Export CLASSPATH
Save exit, view Java version
[Email protected] cdrom]# java-version
Java Version "1.8.0_25"
Java (TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot (TM) 64-bit Server VM (build 25.25-b02, Mixed mode)
Indicates successful installation
Method Three: Modify the ~/.BASHRC file (this method is only valid for the current user and is valid for all shells of the user)
Open the ~/.BASHRC file with the VIM editor
Add the definition of the JDK environment variable at the end of the file
Set java_home=/usr/java/jdk1.8.0_25/
Export Java_home
Set path= $JAVA _home/bin: $PATH
Export PATH
Set classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export CLASSPATH
Linux installation JDK and configuration environment variables