changeset 141:8cb4e38427cc

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:20:51 -0500
parents 8d2ac271064f
children 77c2b187b88f
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:27:54 2011 -0400
+++ b/ChangeLog	Thu Dec 08 16:20:51 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-10-28  Deepak Bhole <dbhole@redhat.com>
 
 	* configure.ac: Prepare for 1.0.7
--- a/netx/net/sourceforge/jnlp/Launcher.java	Fri Oct 28 17:27:54 2011 -0400
+++ b/netx/net/sourceforge/jnlp/Launcher.java	Thu Dec 08 16:20:51 2011 -0500
@@ -32,6 +32,7 @@
 import java.net.UnknownHostException;
 import java.nio.channels.FileChannel;
 import java.nio.channels.FileLock;
+import java.util.Arrays;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.jar.JarFile;
@@ -476,6 +477,10 @@
             }
 
             main.setAccessible(true);
+
+            if (JNLPRuntime.isDebug()) {
+                System.out.println("Invoking main() with args: " + Arrays.toString(args));
+            }
             main.invoke(null, new Object[] { args });
 
             return app;