diff --git a/bindings/java/src/net/hyperic/sigar/Sigar.java b/bindings/java/src/net/hyperic/sigar/Sigar.java index d6972367..b12bf689 100644 --- a/bindings/java/src/net/hyperic/sigar/Sigar.java +++ b/bindings/java/src/net/hyperic/sigar/Sigar.java @@ -31,7 +31,14 @@ public class Sigar implements SigarProxy { try { load(); } catch (SigarException e) { - //will find out later when invoking methods. + String msg = "Sigar.load: " + e.getMessage(); + try { + SigarLog.error(msg, e); + } catch (NoClassDefFoundError ne) { + //no log4j.jar + System.err.println(msg); + e.printStackTrace(); + } } }