diff --git a/bindings/java/src/net/hyperic/sigar/Sigar.java b/bindings/java/src/net/hyperic/sigar/Sigar.java index 56073440..612e11e1 100644 --- a/bindings/java/src/net/hyperic/sigar/Sigar.java +++ b/bindings/java/src/net/hyperic/sigar/Sigar.java @@ -131,7 +131,7 @@ public class Sigar implements SigarProxy { * This method is implemented on Windows only as a helper * for PTQL. */ - public native long getServicePid(String name); + public native long getServicePid(String name) throws SigarException; /** * Send a signal to a process. diff --git a/bindings/java/src/net/hyperic/sigar/SigarProxy.java b/bindings/java/src/net/hyperic/sigar/SigarProxy.java index 278655b7..cf1a02fa 100644 --- a/bindings/java/src/net/hyperic/sigar/SigarProxy.java +++ b/bindings/java/src/net/hyperic/sigar/SigarProxy.java @@ -13,7 +13,7 @@ public interface SigarProxy { public long getPid(); - public long getServicePid(String name); + public long getServicePid(String name) throws SigarException; public Mem getMem() throws SigarException; diff --git a/bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java b/bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java index bedfd366..e931a63b 100644 --- a/bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java +++ b/bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java @@ -24,6 +24,7 @@ public class SynchronizedSigar implements SigarProxy { } public synchronized long getServicePid(String name) + throws SigarException { return this.sigar.getServicePid(name); }