<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Heck's  Blog]]></title> 
<link>https://www.heckjj.com/index.php</link> 
<description><![CDATA[一瞬间的决定，往往可以改变很多，事实上，让自己成功的往往不是知识，是精神！ 如果你总是为自己找借口，那只好让成功推迟。执行力，今天！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Heck's  Blog]]></copyright>
<item>
<link>https://www.heckjj.com/post//</link>
<title><![CDATA[Linux下怎么查看JDK安装路径]]></title> 
<author>Heck &lt;@hecks.tk&gt;</author>
<category><![CDATA[编程杂谈]]></category>
<pubDate>Fri, 25 Dec 2020 06:17:23 +0000</pubDate> 
<guid>https://www.heckjj.com/post//</guid> 
<description>
<![CDATA[ 
	1：echo $JAVA_HOME<br/><br/>使用$JAVA_HOME的话能定位JDK的安装路径的前提是配置了环境变量$JAVA_HOME，否则如下所示，根本定位不到JDK的安装路径<br/><br/>[root@localhost ~]# java -version<br/><br/>java version "1.7.0_65"<br/><br/>OpenJDK Runtime Environment (rhel-2.5.1.2.el6_5-x86_64 u65-b17)<br/><br/>OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)<br/><br/>[root@localhost ~]# echo $JAVA_HOME<br/><br/><a href="https://www.heckjj.com/attachment.php?fid=194" target="_blank"><img src="https://www.heckjj.com/attachment.php?fid=194" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0" width="600"/></a><br/><br/>2：which java<br/><br/>首先要申明一下which java是定位不到安装路径的。which java定位到的是java程序的执行路径。那么怎么定位到java的安装路径呢？下面我们来看看例子吧,如下所示：<br/>[root@localhost ~]# java -version<br/>java version "1.7.0_51"<br/>OpenJDK Runtime Environment (rhel-2.4.5.5.el7-x86_64 u51-b31)<br/>OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)<br/>[root@localhost ~]# which java<br/>/usr/bin/java<br/>[root@localhost ~]# ls -lrt /usr/bin/java<br/>lrwxrwxrwx. 1 root root 22 9月&nbsp;&nbsp; 6 22:51 /usr/bin/java -> /etc/alternatives/java<br/>[root@localhost ~]# ls -lrt /etc/alternatives/java<br/>lrwxrwxrwx. 1 root root 72 9月&nbsp;&nbsp; 6 22:51 /etc/alternatives/java -> /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51-2.4.5.5.el7.x86_64/jre/bin/java<br/><br/><a href="https://www.heckjj.com/attachment.php?fid=195" target="_blank"><img src="https://www.heckjj.com/attachment.php?fid=195" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0" width="800"/></a><br/>Tags - <a href="https://www.heckjj.com/tags/jdk/" rel="tag">jdk</a>
]]>
</description>
</item><item>
<link>https://www.heckjj.com/post//#blogcomment</link>
<title><![CDATA[[评论] Linux下怎么查看JDK安装路径]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://www.heckjj.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>