Skip to content

Commit

Permalink
https://github.com/uavorg/uavstack/issues/475
Browse files Browse the repository at this point in the history
1.fix agent使用openjdk的情况下jvm进程扫描失败的问题
  • Loading branch information
xiaolong committed Jan 11, 2019
1 parent f0fd533 commit 42e973e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ private static void initJVMToolJarClassLoader() {
String javaVersion = System.getProperty("java.version");

String tools = javaHome + File.separator + ".." + File.separator + "lib" + File.separator + "tools.jar";

if(!IOHelper.exists(tools)) {
tools = javaHome + File.separator + "lib" + File.separator + "tools.jar";
}

if (JVMToolClassloader == null) {
synchronized (lock) {
Expand Down Expand Up @@ -320,6 +324,7 @@ private static void initJVMToolJarClassLoader() {
}
catch (Exception e) {
// ignore
e.printStackTrace();
}
}
}
Expand Down Expand Up @@ -395,6 +400,7 @@ public static List<Map<String, String>> getAllJVMProcesses(String host) {
}
catch (Exception e) {
// ignore
e.printStackTrace();
}
}

Expand Down

0 comments on commit 42e973e

Please sign in to comment.