changeset 274:d494ec44a194

Print the arguments passed to the application's main method 2011-12-08 Omair Majid <omajid@redhat.com> * netx/net/sourceforge/jnlp/Launcher.java (launchApplication): Print arguments being passed to the application's main method in debug mode.
author Omair Majid <omajid@redhat.com>
date Thu, 08 Dec 2011 16:09:22 -0500
parents 452aa7fc0e7f
children fe8436ed6d95
files ChangeLog netx/net/sourceforge/jnlp/Launcher.java
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Oct 28 17:28:53 2011 -0400
+++ b/ChangeLog	Thu Dec 08 16:09:22 2011 -0500
@@ -1,3 +1,9 @@
+2011-12-08  Omair Majid  <omajid@redhat.com>
+
+	* netx/net/sourceforge/jnlp/Launcher.java
+	(launchApplication): Print arguments being passed to the application's
+	main method in debug mode.
+
 2011-09-28  Deepak Bhole <dbhole@redhat.com>
 
 	* NEWS: Prepare for 1.1.5
--- a/netx/net/sourceforge/jnlp/Launcher.java	Fri Oct 28 17:28:53 2011 -0400
+++ b/netx/net/sourceforge/jnlp/Launcher.java	Thu Dec 08 16:09:22 2011 -0500
@@ -25,6 +25,7 @@
 import java.net.InetAddress;
 import java.net.URL;
 import java.net.UnknownHostException;
+import java.util.Arrays;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
@@ -587,6 +588,10 @@
             handler.launchStarting(app);
 
             main.setAccessible(true);
+
+            if (JNLPRuntime.isDebug()) {
+                System.out.println("Invoking main() with args: " + Arrays.toString(args));
+            }
             main.invoke(null, new Object[] { args });
 
             return app;