Is there a OS command to find what Java version Tomcat6 is using? I need to use a Perl (including system()) command.
I using Linux. Ubuntu and CentOS
Is there something like?
tomcat6 version
Is there a OS command to find what Java version Tomcat6 is using? I need to use a Perl (including system()) command.
I using Linux. Ubuntu and CentOS
Is there something like?
tomcat6 version
For Windows, launch cmd prompt and route to the path(usually bin) where you have your tomcat startup script.
If tomcat did not start up yet , you can use the command
\bin\cataline version
to check which JVM will the tomcat use when you start tomcat usingbin\startup
In fact ,
\bin\cataline version
just call the main class oforg.apache.catalina.util.ServerInfo
, which is located inside the\lib\catalina.jar
. Theorg.apache.catalina.util.ServerInfo
gets the JVM Version and JVM Vendor by the following commands:So , if the tomcat is running , you can create a JSP page that call
org.apache.catalina.util.ServerInfo
or just simply call the aboveSystem.getProperty()
to get the JVM Version and Vendor . Deploy this JSP to the running tomcat instance and browse to it to see the result.Alternatively, you should know which port is the running tomcat instance using . So , you can use the OS command to find which process is listening to this port. For example in the window , you can use the command
netstat -aon
to find out the process ID of a process that is listening to a particular port . Then go to the window task manager to check the full file path of this process ID belongs to. .The java version can then be determined from that file path.After installing tomcat, you can choose "configure tomcat" by search in "search programs and files". After clicking on "configure Tomcat", you should give admin permissions and the window opens. Then click on "java" tab. There you can see the JVM and JAVA classpath.