Ticket #3880: icedtea-web-1.4-imminent_breakage_fix-1.patch

File icedtea-web-1.4-imminent_breakage_fix-1.patch, 3.0 KB (added by Fernando de Oliveira, 11 years ago)

Latest OpenJDK breaks Java browser plugin

  • netx/net/sourceforge/jnlp/runtime/Boot.java

    Submitted By: Fernando de Oliveira <famobr at yahoo dot com dot br>
    Date: 2013-07-11
    Initial Package Version: 1.4 (though original post mentions head, 1.3, 1.2 as well)
    Upstream Status: Submitted
    Origin: Jiri Vanek <jvanek at redhat.com>
    http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2013-June/023745.html
    Description: Latest OpenJDK breaks Java browser plugin
    diff -Naur icedtea-web-1.4.orig/netx/net/sourceforge/jnlp/runtime/Boot.java icedtea-web-1.4/netx/net/sourceforge/jnlp/runtime/Boot.java
    old new  
    3535import net.sourceforge.jnlp.cache.UpdatePolicy;
    3636import net.sourceforge.jnlp.security.viewer.CertificateViewer;
    3737import net.sourceforge.jnlp.services.ServiceUtil;
     38import sun.awt.AppContext;
     39import sun.awt.SunToolkit;
    3840
    3941/**
    4042 * This is the main entry point for the JNLP client.  The main
     
    113115     * Launch the JNLP file specified by the command-line arguments.
    114116     */
    115117    public static void main(String[] argsIn) {
     118        if (AppContext.getAppContext() == null) {
     119            SunToolkit.createNewAppContext();
     120        }
    116121        args = argsIn;
    117122
    118123        if (null != getOption("-viewer")) {
  • netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java

    diff -Naur icedtea-web-1.4.orig/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java icedtea-web-1.4/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
    old new  
    234234        try {
    235235            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    236236        } catch (Exception e) {
    237             // ignore it
     237            e.printStackTrace();
    238238        }
    239239
    240240        doMainAppContextHacks();
  • plugin/icedteanp/java/sun/applet/PluginMain.java

    diff -Naur icedtea-web-1.4.orig/plugin/icedteanp/java/sun/applet/PluginMain.java icedtea-web-1.4/plugin/icedteanp/java/sun/applet/PluginMain.java
    old new  
    7272import java.net.ProxySelector;
    7373import java.util.Enumeration;
    7474import java.util.Properties;
     75import sun.awt.AppContext;
     76import sun.awt.SunToolkit;
    7577
    7678import net.sourceforge.jnlp.config.DeploymentConfiguration;
    7779import net.sourceforge.jnlp.runtime.JNLPRuntime;
     
    9496     */
    9597    public static void main(String args[])
    9698            throws IOException {
     99        if (AppContext.getAppContext() == null) {
     100            SunToolkit.createNewAppContext();
     101        }
    97102        if (args.length != 2 || !(new File(args[0]).exists()) || !(new File(args[1]).exists())) {
    98103            System.err.println("Invalid pipe names provided. Refusing to proceed.");
    99104            System.exit(1);