diff --git a/bindings/java/src/net/hyperic/sigar/win32/Service.java b/bindings/java/src/net/hyperic/sigar/win32/Service.java index e955a19f..2d827e6d 100644 --- a/bindings/java/src/net/hyperic/sigar/win32/Service.java +++ b/bindings/java/src/net/hyperic/sigar/win32/Service.java @@ -331,20 +331,18 @@ public class Service extends Win32 { ServiceConfig config); public static void main(String[] args) throws Exception { - List services = getServiceNames(); + List services; + if (args.length == 0) { + services = getServiceNames(); + } + else { + services = Arrays.asList(args); + } + for (int i=0; i