方法一:whereis java
方法二:which java
方法三:linux下启动tomcat时也会说using jre:/usr等类似的语句。
方法四:执行命令 ps -ef|grep java
方法五:sudo update-alternatives --config java
可以看出系统有多少个JDK版本。
refurl:http://zhidao.baidu.com/link?url=IEnNCBz6kRJX9bDXRvTdRYc7wAX7J42qo2JcbtRLHUWe0_4jvf3mZw8JN0XSLLd-_0LaWT1XIXe8qMHgvH1Goq
http://blog.csdn.net/snowdream86/article/details/6677450
http://forum.ubuntu.org.cn/viewtopic.php?t=183803