linux查看jdk的安装路径
时间: 2023-08-24 10:12:00 浏览: 162
要查看Linux上JDK的安装路径,可以使用以下命令:
1. 使用ls -lrt命令查看/usr/bin/java的执行路径。根据结果可以找到JDK的安装路径为/usr/lib/jvm/java-1.8.0。\[1\]
2. 使用ls -l /etc/alternatives/java命令查看/etc/alternatives/java的符号链接路径。根据结果可以找到JDK的安装路径为/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.191-2.6.15.4.el7_5.x86_64/jre/bin/java。\[2\]
3. 如果JDK是通过源码安装的,使用rpm -qa | grep java命令可能无法定位到JDK的安装路径。\[3\]
#### 引用[.reference_title]
- *1* *3* [环境部署(四):Linux下查看JDK安装路径](https://blog.csdn.net/weixin_33861800/article/details/85981277)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [Linux下查找JDK安装路径](https://blog.csdn.net/csdnbkyhm/article/details/108349182)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文