changeset 1972:c5c7cfebb101

netx: use getMethod instead of getDeclaredMethod to find main method 2010-08-05 Omair Majid <omajid@redhat.com> * NEWS: Update with netx bugfix. * rt/net/sourceforge/jnlp/Launcher.java (launchApplication): Replace use of getDeclaredMethod with getMethod. Fixes applications that have a main-class that inherits main(String[]).
author Omair Majid <omajid@redhat.com>
date Thu, 05 Aug 2010 17:52:08 -0400
parents 9e75f57aae29
children daffd234afbd 7987f496f107
files ChangeLog NEWS rt/net/sourceforge/jnlp/Launcher.java
diffstat 3 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Jul 30 16:06:02 2010 -0400
+++ b/ChangeLog	Thu Aug 05 17:52:08 2010 -0400
@@ -1,3 +1,11 @@
+2010-08-05  Omair Majid  <omajid@redhat.com>
+
+	* NEWS: Update with netx bugfix.
+	* rt/net/sourceforge/jnlp/Launcher.java
+	(launchApplication): Replace use of getDeclaredMethod with 
+	getMethod. Fixes applications that have a main-class that 
+	inherits main(String[]).
+
 2010-07-30  Man Lung Wong  <mwong@redhat.com>
 	* netx/net/sourceforge/jnlp/Launcher.java
 	(launchApplication): Make sure an Event Dispatch Thread
--- a/NEWS	Fri Jul 30 16:06:02 2010 -0400
+++ b/NEWS	Thu Aug 05 17:52:08 2010 -0400
@@ -2,6 +2,7 @@
 
 * NetX
  - Fix browser command in BasicService.showDocument(URL)
+ - Run programs that inherit main(String[]) in their main-class
 
 New in release 1.7.4 (2010-07-28):
 
--- a/rt/net/sourceforge/jnlp/Launcher.java	Fri Jul 30 16:06:02 2010 -0400
+++ b/rt/net/sourceforge/jnlp/Launcher.java	Thu Aug 05 17:52:08 2010 -0400
@@ -441,7 +441,7 @@
             
             Class mainClass = app.getClassLoader().loadClass(mainName);
 
-            Method main = mainClass.getDeclaredMethod("main", new Class[] {String[].class} );
+            Method main = mainClass.getMethod("main", new Class[] {String[].class} );
             String args[] = file.getApplication().getArguments();
             
             SwingUtilities.invokeAndWait(new Runnable() {