[icedtea-web/f18] added patch1 b25-appContextFix.patch to make it run with future openjdk

jiri vanek jvanek at fedoraproject.org
Wed Jun 19 10:01:20 UTC 2013


commit 4c2cb1da6b34ab5103caaa2e1cce9d42f69ab523
Author: Jiri Vanek <jvanek at jvanek.redhat>
Date:   Wed Jun 19 12:00:52 2013 +0200

    added patch1 b25-appContextFix.patch to make it run with future openjdk

 b25-appContextFix.patch |   56 +++++++++++++++++++++++++++++++++++++++++++++++
 icedtea-web.spec        |    9 ++++++-
 2 files changed, 64 insertions(+), 1 deletions(-)
---
diff --git a/b25-appContextFix.patch b/b25-appContextFix.patch
new file mode 100644
index 0000000..291a00b
--- /dev/null
+++ b/b25-appContextFix.patch
@@ -0,0 +1,56 @@
+diff -r 1a327a09262e netx/net/sourceforge/jnlp/runtime/Boot.java
+--- a/netx/net/sourceforge/jnlp/runtime/Boot.java	Mon Jun 10 13:22:53 2013 +0200
++++ b/netx/net/sourceforge/jnlp/runtime/Boot.java	Wed Jun 19 10:32:32 2013 +0200
+@@ -35,6 +35,8 @@
+ import net.sourceforge.jnlp.cache.UpdatePolicy;
+ import net.sourceforge.jnlp.security.viewer.CertificateViewer;
+ import net.sourceforge.jnlp.services.ServiceUtil;
++import sun.awt.AppContext;
++import sun.awt.SunToolkit;
+ 
+ /**
+  * This is the main entry point for the JNLP client.  The main
+@@ -113,6 +115,9 @@
+      * Launch the JNLP file specified by the command-line arguments.
+      */
+     public static void main(String[] argsIn) {
++        if (AppContext.getAppContext() == null) {
++            SunToolkit.createNewAppContext();
++        }
+         args = argsIn;
+ 
+         if (null != getOption("-viewer")) {
+diff -r 1a327a09262e netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
+--- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java	Mon Jun 10 13:22:53 2013 +0200
++++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java	Wed Jun 19 10:32:32 2013 +0200
+@@ -234,7 +234,7 @@
+         try {
+             UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+         } catch (Exception e) {
+-            // ignore it
++            e.printStackTrace();
+         }
+ 
+         doMainAppContextHacks();
+diff -r 1a327a09262e plugin/icedteanp/java/sun/applet/PluginMain.java
+--- a/plugin/icedteanp/java/sun/applet/PluginMain.java	Mon Jun 10 13:22:53 2013 +0200
++++ b/plugin/icedteanp/java/sun/applet/PluginMain.java	Wed Jun 19 10:32:32 2013 +0200
+@@ -72,6 +72,8 @@
+ import java.net.ProxySelector;
+ import java.util.Enumeration;
+ import java.util.Properties;
++import sun.awt.AppContext;
++import sun.awt.SunToolkit;
+ 
+ import net.sourceforge.jnlp.config.DeploymentConfiguration;
+ import net.sourceforge.jnlp.runtime.JNLPRuntime;
+@@ -94,6 +96,9 @@
+      */
+     public static void main(String args[])
+             throws IOException {
++        if (AppContext.getAppContext() == null) {
++            SunToolkit.createNewAppContext();
++        }
+         if (args.length != 2 || !(new File(args[0]).exists()) || !(new File(args[1]).exists())) {
+             System.err.println("Invalid pipe names provided. Refusing to proceed.");
+             System.exit(1);
diff --git a/icedtea-web.spec b/icedtea-web.spec
index 18a4857..4b8de2d 100644
--- a/icedtea-web.spec
+++ b/icedtea-web.spec
@@ -41,7 +41,7 @@
 
 Name:		icedtea-web
 Version:	1.4
-Release:	0%{?dist}
+Release:	1%{?dist}
 Summary:	Java browser plug-in and Web Start implementation
 
 Group:      Applications/Internet
@@ -49,6 +49,8 @@ License:    LGPLv2+ and GPLv2 with exceptions
 URL:        http://icedtea.classpath.org/wiki/IcedTea-Web
 Source0:    http://icedtea.classpath.org/download/source/%{name}-%{version}.tar.gz
 
+Patch1:		b25-appContextFix.patch
+
 BuildRequires:  java-%{javaver}-openjdk-devel
 BuildRequires:  desktop-file-utils
 BuildRequires:  gecko-devel
@@ -96,6 +98,8 @@ This package contains Javadocs for the IcedTea-Web project.
 %prep
 %setup -q
 
+%patch1 -p1
+
 %build
 autoreconf
 ./configure \
@@ -171,6 +175,9 @@ exit 0
 %doc COPYING
 
 %changelog
+* Wed Jun 19 2013 Jiri Vanek <jvanek at redhat.com> 1.4.0-1
+- added patch1 b25-appContextFix.patch to make it run with future openjdk
+
 * Sat May 04 2013 Jiri Vanek <jvanek at redhat.com> 1.4-0
 - Updated to 1.4
 - See announcement for detail


More information about the scm-commits mailing list