Author: mladen.turk(a)jboss.com
Date: 2007-10-23 08:14:07 -0400 (Tue, 23 Oct 2007)
New Revision: 1144
Modified:
trunk/utils/windows/native/service/classes/org/jboss/windows/Service.java
Log:
Add some comments
Modified: trunk/utils/windows/native/service/classes/org/jboss/windows/Service.java
===================================================================
--- trunk/utils/windows/native/service/classes/org/jboss/windows/Service.java 2007-10-23
12:10:18 UTC (rev 1143)
+++ trunk/utils/windows/native/service/classes/org/jboss/windows/Service.java 2007-10-23
12:14:07 UTC (rev 1144)
@@ -43,9 +43,11 @@
SignalHelper.initialize(null);
}
catch(Exception x) {
- // Ignore all native initialization exceptions
+ // Ignore all native initialization exceptions
}
try {
+ // Presume we have at least one argument
+ // (org.jboss.Main)
Class mainClass = Class.forName(args[0]);
Object mainObject = mainClass.newInstance();
@@ -57,10 +59,13 @@
cmdArgs[i] = args[i + 1];
argList[0] = cmdArgs;
Method mainMethod = mainClass.getMethod("main", paramTypes);
+ // Invoke the main method from args[0]
mainMethod.invoke(mainObject, argList);
}
catch (Throwable e) {
+ // Perhaps we should throw some errors here, but they'll be
+ // printed anyhow
System.err.println(e);
}
- }
+ }
}