From 4c522ad7ed4d7568e47d303f83b485f68190c0a3 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Wed, 16 Jan 2008 05:44:53 +0000 Subject: [PATCH] [SIGAR-82] Add /usr/local/lib/vmware to search path --- .../sigar/vmware/VMControlLibrary.java | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/bindings/java/src/org/hyperic/sigar/vmware/VMControlLibrary.java b/bindings/java/src/org/hyperic/sigar/vmware/VMControlLibrary.java index 49faf725..ef19302e 100644 --- a/bindings/java/src/org/hyperic/sigar/vmware/VMControlLibrary.java +++ b/bindings/java/src/org/hyperic/sigar/vmware/VMControlLibrary.java @@ -76,16 +76,28 @@ public class VMControlLibrary { } private static File getVMwareLib() { - String location = "/usr/lib/vmware"; - File lib = new File(location); - if (lib.exists()) { - //running on a VMware host - return lib; + String[] locations = { + "/usr/lib/vmware", + "/usr/local/lib/vmware", + }; + + for (int i=0; i