Cannot start application with jre 8 using a Java 5 webstart

XMLWordPrintable

    • x86_64
    • windows_7

      FULL PRODUCT VERSION :
      java version "1.8.0_102"
      Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
      Java HotSpot(TM) Client VM (build 25.102-b14, mixed mode)

      java webstart version:
      java version "1.5.0_15"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
      Java HotSpot(TM) Client VM (build 1.5.0_15-b04, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [versie 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      We are using Java 5 webstart (1.5.0_15). When we try to start a webstart application with a java 8 jre in the jnlp (using the Java 5 javaws.exe), we get a NullPointerException in the webstart launch code. When specifying a java 6 jre in the jnlp, we can start this same application without a problem (using the Java 5 javaws.exe).

      The NullPointerException is caused by the AppContext.getAppContext() method in Java 8 returning null. The implementation in Java 8 assumes the context has been set by the webstart launcher. This is true for the 1.6+ launcher, however, the java 5 webstart launcher doesn't initialise the AppContext resulting in NullPointerExceptions when using this null AppContext.



      REGRESSION. Last worked in version 6u43

      ADDITIONAL REGRESSION INFORMATION:
      java version "1.6.0_18"
      Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
      Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create a webstart application with following j2se element in the jnlp:
      <j2se version="1.8.+" ... />

      Start this webstart application with a Java 5 javaws.exe.



      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The application is started with a Java 8 runtime.
      ACTUAL -
      The Java 8 runtimes start, but suddenly stops and the application is not started.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      If you enable the webstart trace logging, you'll see the following NullPointerException in the log file:

      Exception in thread "javawsApplicationMain" java.lang.NullPointerException
          at sun.awt.SunToolkit.getSystemEventQueueImplPP(Unknown Source)
          at sun.awt.SunToolkit.getSystemEventQueueImplPP(Unknown Source)
          at sun.awt.SunToolkit.getSystemEventQueueImpl(Unknown Source)
          at java.awt.Toolkit.getEventQueue(Unknown Source)
          at java.awt.EventQueue.isDispatchThread(Unknown Source)
          at java.awt.EventQueue.invokeAndWait(Unknown Source)
          at java.awt.EventQueue.invokeAndWait(Unknown Source)
          at javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
          at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
          at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
          at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
          at com.sun.javaws.Launcher.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Enable the webstart console.
      When enabling the console, an AppContext will be created because the 'javawebstart.version' system property has not been set at that time.

            Assignee:
            Mikhail Cherkasov (Inactive)
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: