diff --git a/bindings/java/src/net/hyperic/sigar/cmd/Ps.java b/bindings/java/src/net/hyperic/sigar/cmd/Ps.java index e637a794..cbc33b38 100644 --- a/bindings/java/src/net/hyperic/sigar/cmd/Ps.java +++ b/bindings/java/src/net/hyperic/sigar/cmd/Ps.java @@ -151,7 +151,9 @@ public class Ps extends SigarCommandBase { else { try { String[] args = sigar.getProcArgs(pid); - name = args[0]; + if (args.length != 0) { + name = args[0]; + } } catch (SigarException e) {} }