Install the official JDK under Fedora 20 to replace OpenJDK and configure environment variables.
Fedora 20 comes with OpenJDK, So if you install the official JDK, you must first Delete OpenJDK as follows:
1: run the rpm-qa | grep jdk command to check the current jdk status.
2: yum-y remove java java-1.7.0-openjdk * uninstall openjdk, which may uninstall some additional software due to dependency.
3: Download the official JDK from oracle.gz.
4: Decompress the jdk installation package tar-zxvf jdk-7u51-linux-x64.tar.gz to copy to your own software folder, my software is generally put under opt, so mv jdk1.7.0 _ 51 // opt/
5: configure the environment variable vi/etc/profile and enter the following content in the last row.
Export JAVA_HOME =/opt/jdk1.7.0 _ 51
Export CLASSPATH = $ CLASSPATH: $ JAVA_HOME/lib: $ JAVA_HOME/jre/lib
Export PATH = $ JAVA_HOME/bin: $ JAVA_HOME/jre/bin: $ PATH: $ HOME/bin
6: make the environment variable take effect source/etc/profile
7. Enter java or java-version.
For more information about Fedora, see Fedora topics page http://www.linuxidc.com/topicnews.aspx? Tid = 5