From aa9baeefd15b947170e7759dcc2cc1081cb963b0 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sun, 26 Jun 2005 03:22:08 +0000 Subject: [PATCH] changes to main method --- .../src/net/hyperic/sigar/win32/Service.java | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) 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