This article is a mirror article of machine translation, please click here to jump to the original article.

View: 15969|Reply: 0

[Source] Centos installs the JDK with yum

[Copy link]
Posted on 2/13/2017 3:42:13 PM | | | |

1. Check which JDK versions are available in the yum library (only openJDK has been found for the time being)




2. Select the version and install it



We cd into the /usr/lib/jvm/ directory, and then cd into the directory that starts with java, as follows:



As you can see, our installation directory is: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.121

3. Set environment variables




Add the following content to the profile file




Make the changes work



4. Verification
Execute java -version







Previous:Python multiple versions cause yum to run errors
Next:nohup: failed to run command `java': No such file or directory
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com