Fedora 20 comes with openjdk, so if you install the official JDK, remove OPENJDK first, as follows:
1:rpm-qa|grep jdk to view the current JDK situation.
2:yum-y Remove Java java-1.7.0-openjdk* Uninstall OPENJDK, a process in which some additional software may be uninstalled for reasons of dependency.
3: Go to Oracle website to download the official JDK, I downloaded the tar.gz format.
4: Unzip the JDK installation package TAR-ZXVF jdk-7u51-linux-x64.tar.gz Copy to your own software folder, my software is generally placed under OPT, so MV jdk1.7.0_51//opt/
5: Configure the environment variable Vi/etc/profile enter the following at the bottom of the third line
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 effective source/etc/profile
7: Enter Java or java-version look at it.
For more information about Fedora, see the Fedora feature page http://www.linuxidc.com/topicnews.aspx?tid=5
Install official JDK under Fedora 20 replace OPENJDK and configure environment variables