linux中启动了tomcat但使用ps -ef|grep java查找不到
解决方法:
可以执行命令jps -v代替ps -ef|grep java
例如
[root@VM_0_4_centos bin]# jps -v
21718 Jps -Denv.class.path=.:/usr/local/java/jdk1.8.0_192/lib:/usr/local/java/jdk1.8.0_192/jre/lib -
Dapplication.home=/usr/local/java/jdk1.8.0_192 -Xms8m
21702 Bootstrap -Djava.util.logging.config.file=/usr/local/java/tomcat8/conf/logging.properties -
Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -
Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -
Dignore.endorsed.dirs= -Dcatalina.base=/usr/local/java/tomcat8 -Dcatalina.home=/usr/local/java/tomcat8 -
Djava.io.tmpdir=/usr/local/java/tomcat8/temp
其中21702 Bootstrap中21702就是java的进程pid