mirror of
https://gitee.com/arthas/arthas.git
synced 2024-11-30 11:17:39 +08:00
Exclude JDK 11 jps process. close #451
This commit is contained in:
parent
4b98af05a9
commit
5c857d045a
@ -121,7 +121,7 @@ public class ProcessUtils {
|
||||
if (pid == currentPid) {
|
||||
continue;
|
||||
}
|
||||
if (strings.length >= 2 && strings[1].equals("sun.tools.jps.Jps")) { // skip jps
|
||||
if (strings.length >= 2 && isJspProcess(strings[1])) { // skip jps
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -380,4 +380,7 @@ public class ProcessUtils {
|
||||
return jpsList.get(0);
|
||||
}
|
||||
|
||||
private static boolean isJspProcess(String mainClassName) {
|
||||
return "sun.tools.jps.Jps".equals(mainClassName) || "jdk.jcmd/sun.tools.jps.Jps".equals(mainClassName);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user