centos查找已安裝的jdk路徑的方法
在可執(zhí)行 java命令的情況下查找過程如下:
執(zhí)行which java
[root@localhost ~]# which java /usr/bin/java
執(zhí)行l(wèi)s -lrt /usr/bin/java
[root@localhost ~]# ls -lrt /usr/bin/java lrwxrwxrwx. 1 root root 22 10月 10 08:06 /usr/bin/java -> /etc/alternatives/java
執(zhí)行l(wèi)s -lrt /etc/alternatives/java
[root@localhost ~]# ls -lrt /etc/alternatives/java lrwxrwxrwx. 1 root root 73 10月 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
由上可知java的路徑為: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64,進(jìn)入該路徑查看文件如下:
[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 總用量 4 drwxr-xr-x. 2 root root 4096 10月 10 14:53 bin drwxr-xr-x. 3 root root 132 10月 10 14:53 include drwxr-xr-x. 4 root root 28 10月 10 08:03 jre drwxr-xr-x. 3 root root 144 10月 10 14:53 lib drwxr-xr-x. 2 root root 204 10月 10 14:53 tapset [root@localhost java-1.8.0-openjdk-1.8.0.144-0.b01.el7_4.x86_64]#
以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持本站。
版權(quán)聲明:本站文章來源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請保持原文完整并注明來源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學(xué)習(xí)參考,不代表本站立場,如有內(nèi)容涉嫌侵權(quán),請聯(lián)系alex-e#qq.com處理。