Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does centos find the installed jdk path

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how centos finds installed jdk paths. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

When the java command is executable, the lookup process is as follows:

Execute which java

[root@localhost ~] # which java/usr/bin/java

Execute ls-lrt / usr/bin/java

[root@localhost] # ls-lrt / usr/bin/javalrwxrwxrwx. 1 root root 22 October 10 08:06 / usr/bin/java-> / etc/alternatives/java

Execute ls-lrt / etc/alternatives/java

[root@localhost] # ls-lrt / etc/alternatives/javalrwxrwxrwx. 1 root root 73 October 10 08:06 / etc/alternatives/java-> / usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64/jre/bin/java

As can be seen from the above, the path of java is / usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64. Enter the path to view the file as follows:

[root@localhost] # cd / usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64 [root@localhost java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64] # ll total dosage 4drwxr-xr-x. 2 root root 4096 October 10 14:53 bindrwxr-xr-x. 3 root root 132 October 10 14:53 includedrwxr-xr-x. 4 root root 28 October 10 08:03 jredrwxr-xr-x. 3 root root 144October 10 14:53 libdrwxr-xr-x. 2 root root 204Oct 10 14:53 tapset [root@localhost java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64] # Thank you for reading! This is the end of this article on "how to find installed jdk paths for centos". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report