Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8019167

ClassFinder.findClass cannot find class in linked jar when running from webstart

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • 7u40
    • 7u25
    • deploy

      FULL PRODUCT VERSION :
      java version " 1.7.0_25 "
      Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
      Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      If the application is run from java webstart, ClassFinder.findClass on the EventQueue thread can not find classes in jars linked in the JNLP file. This is causing a crash in XMLDecoder.readObject because parsing xml containing a class from a linked jar file fails.

      Note: calls to ClassFinder.findClass work fine on the main thread, but not on the EventQueue thread.

      This appears to be related to the fact that Thread.currentThread().getContextClassLoader() in the EventQueue thread has changed behavior in 7u25.

      In 7u21, this returned a loader of type com.sun.jnlp.JNLPClassLoader, which can load the required class.
      In 7u25, this returns a loader of type sun.misc.Launcher$AppClassLoader, which cannot load the required class.


      REPRODUCIBILITY :
      This bug can be reproduced always.

            dmarkov Dmitry Markov
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: