Using yum to install and uninstall jdk under CentOS6.4 Linux

Use yum to install jdk under Linux

 

OpenJDK is generally installed through yum

 

1. Find java related list    

  yum -y list java*



 
2. Install jdk (user must have root privileges
) 

  yum -y install java-1.8.0-openjdk*

3. Verify that the installation was successful 

   java -version

 

 
4. The default installation path /usr/lib/jvm

 

 5. View the installed jdk

    rpm -qa|grep jdk 

 

6. Uninstall openjdk

   yum -y remove java-1.8.0-openjdk*

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326215042&siteId=291194637