macos 如何在mac上找到正在运行的java进程的进程ID?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11458710/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to find the process id of a running java process on mac?
提问by user1521750
I am trying to find the PID of a java webapp on a Mac. More specifically, I am trying to find the PID for a jetty webapp running on my Desktop. I have tried using Activity monitor and searched online all to no avail.
我正在尝试在 Mac 上查找 java webapp 的 PID。更具体地说,我正在尝试为在我的桌面上运行的 jetty web 应用程序查找 PID。我曾尝试使用活动监视器并在网上搜索无济于事。
回答by Paul Sanwald
回答by jesse mcconnell
Open a terminal and type jps -v
打开终端并输入 jps -v
回答by fedosov
Try to use ps aux | grep APP_NAME
in Terminal.
尝试ps aux | grep APP_NAME
在终端中使用。
回答by Bruno Grieder
This works for me
这对我有用
pgrep -f jetty
pgrep -f jetty