diff --git a/com.creditease.uav.helper/src/main/java/com/creditease/agent/helpers/JVMToolHelper.java b/com.creditease.uav.helper/src/main/java/com/creditease/agent/helpers/JVMToolHelper.java index c590326f..5dfa3cee 100644 --- a/com.creditease.uav.helper/src/main/java/com/creditease/agent/helpers/JVMToolHelper.java +++ b/com.creditease.uav.helper/src/main/java/com/creditease/agent/helpers/JVMToolHelper.java @@ -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) { @@ -320,6 +324,7 @@ private static void initJVMToolJarClassLoader() { } catch (Exception e) { // ignore + e.printStackTrace(); } } } @@ -395,6 +400,7 @@ public static List> getAllJVMProcesses(String host) { } catch (Exception e) { // ignore + e.printStackTrace(); } }