locate home of running java application

1. find the target process id of your java app

jps  [-lm]

in my case:

[lenmom@Mi-1701 bin]$ jps -l
5650 sun.tools.jps.Jps
20646 org.apache.doris.broker.hdfs.BrokerBootstrap
31814 org.apache.flume.node.Application

and I wana to find the location of  flume app in localmachine

2. use ps  auxef | grep {processid}

[lenmom@Mi-1701 bin]$ ps auxe | grep 31814

the PWD is the location of java app

猜你喜欢

转载自www.cnblogs.com/lenmom/p/11851957.html