Home  >  Article  >  System Tutorial  >  How to solve the problem of failure to install jdk under linux?

How to solve the problem of failure to install jdk under linux?

PHPz
PHPzforward
2024-01-14 11:42:191301browse

What should I do if the installation of jdk under Linux fails? Some friends encountered the problem of installation failure when installing jdk in linux. The following is a graphic tutorial on installing jdk in linux. Let’s learn about it together! Linux installation jdk graphic tutorial:

Sometimes out of necessity (such as installing the latest eclipse), we need to install a specified version of JDK. However, after the installation was completed, I typed the command again to query the JDK version but found that the version number was not updated.

1. Under Linux system, start the terminal. Type the command su in the terminal and press Enter. Then type the root password (note that the password is not displayed on the screen), press Enter, and log in to the root account.

How to solve the problem of failure to install jdk under linux?

2. Type the command java-version to query the current JDK version.

How to solve the problem of failure to install jdk under linux?

3. If the version number is not what you want, type rpm -qa|grep gcj.

How to solve the problem of failure to install jdk under linux?

4. Type the command yum -y remove (followed by the version obtained from the query) to remove the old version.

How to solve the problem of failure to install jdk under linux?

The above is the detailed content of How to solve the problem of failure to install jdk under linux?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:linuxprobe.com. If there is any infringement, please contact admin@php.cn delete