How to build a Java environment in the CentOS environment

Source: Internet
Author: User

Installing the Java Environment on CentOS: [1] installing Java with Yum

At present, enterprise-level project development is generally implemented in the Java language. The development of the project needs to be put on the server to run tests, if the CentOS system as a server system, the first thing to solve is the CentOS system on the Java environment to build.

Let me share with you: How to install Java environment on CentOS using the Yum method, CentOS6.4 for example

Tools/Materials
    • Java JDK

    • Yum Library

    • CentOS6.4

Method/Step
  1. Check to see if the CentOS JDK is installed.

    Input: Yum list installed |grep java.

  2. How do I uninstall a CentOS system with a Java environment if I have a self-installing JDK?

    Uninstall JDK-related file input: yum-y remove java-1.7.0-openjdk*.

    Uninstall Tzdata-java Input: Yum-y remove Tzdata-java.noarch.

    When the results are displayed as complete! The uninstallation is complete.

    Note: "*" means uninstalling all OPENJDK related files for Java 1.7.0.

  3. Check that the CentOS system network connection is working properly.

    Using the Yum installation requires a connection to the network to download Java installation files, so you need to use the ping command to test the network, such as: ping Baidu URL.

  4. View the Java installation package in the Yum Library.

    Input: Yum-y list java*.

  5. Install the Java environment using Yum.

    Input: yum-y install java-1.7.0-openjdk*, take java-1.7.0 in the Yum library as an example.

    When the results are displayed as complete! The installation is complete.

    Note: "*" means that all relevant Java programs for java-1.7.0 are installed.

  6. View the Java version information you just installed.

    Input: Java-version to view Java version;

    Input: Javac can view the Java compiler command usage (optional).

How to build a Java environment in the CentOS environment

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.