I am running Tomcat 6.0.31 on Ubuntu 10.10 and using tge Sun JDK (java-6-sun). Although tomcat is running its process does not show up when I run jps (Java Virtual Machine Process Status Tool). The only output I see is the pid for the jps process itself. Why would the Tomcat process not show up?
解决方案
You are probably running into Bug 7009828:
In Java 6 Update 23 and Java 6 Update 24, Java consider the java.io.tmpdir property when deciding where to place some files that were needed for jps, jconsole and jvisulavm to detect locally running JVMs. This means that every JVM instance that had this system property defined to something other than the default (/tmp) would be invisible to these tools.
Tomcat installations in particular default to setting this property to their installations temp folder.
So: either upgrade to Java 6 Update 25 or later (where the bug is fixed) or start jps with -J-Djava.io.tmpdir=/path-to-tomcat-installation/temp.