diff --git a/bindings/java/src/net/hyperic/sigar/cmd/Version.java b/bindings/java/src/net/hyperic/sigar/cmd/Version.java index 67485499..ae1d452f 100644 --- a/bindings/java/src/net/hyperic/sigar/cmd/Version.java +++ b/bindings/java/src/net/hyperic/sigar/cmd/Version.java @@ -35,10 +35,13 @@ public class Version extends SigarCommandBase { } private static String getFQDN() { + Sigar sigar = new Sigar(); try { - return Sigar.getInstance().getFQDN(); + return sigar.getFQDN(); } catch (SigarException e) { return "unknown"; + } finally { + sigar.close(); } }