Install official JDK under Fedora 20 replace OPENJDK and configure environment variables

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.