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}

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

the PWD is the location of java app

 

Guess you like

Origin www.cnblogs.com/lenmom/p/11851957.html