How to Find Java and Tomcat Version on Server.

Use  these commands to find out the Java and Tomcat Versions on the server.

For Java

root@server[#] java -version

java version “1.6.0_17”
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Server VM (build 14.3-b01, mixed mode)

For Tomcat

root@server[#] cd /usr/local/jakarta/tomcat/bin
root@server[#] ls
root@server[#] ./ or
root@server[#] sh

Using CATALINA_BASE:   /usr/local/jakarta/tomcat
Using CATALINA_HOME:   /usr/local/jakarta/tomcat
Using CATALINA_TMPDIR: /usr/local/jakarta/tomcat/temp
Using JRE_HOME:       /usr/local/jdk
Server version: Apache Tomcat/5.5.9

That’s all this will do it.