jdic
  1. jdic
  2. JDIC-515

If the WebStart ClassLoader isn't "com.sun.jnlp.JNLPClassLoader", look up the getParent() chain for it before giving up

    Details

    • Type: Task Task
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: None
    • Component/s: JDIC general
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      515

      Description

      This is similar to:

      https://jdic.dev.java.net/issues/show_bug.cgi?id=473

      Here's the patch:

      Index: JdicManager.java
      ===================================================================
      RCS file:
      /cvs/jdic/src/jdic/src/share/classes/org/jdesktop/jdic/init/JdicManager.java,v
      retrieving revision 1.30
      diff -u -r1.30 JdicManager.java
      — JdicManager.java 4 Dec 2006 07:07:18 -0000 1.30
      +++ JdicManager.java 1 Apr 2008 02:29:28 -0000
      @@ -290,26 +290,30 @@
      try {
      Class jnlpClassLoaderClass = Class
      .forName("com.sun.jnlp.JNLPClassLoader");

      • if (cl.getClass().isAssignableFrom(jnlpClassLoaderClass)) {
      • Method findLibMethod = jnlpClassLoaderClass.getDeclaredMethod(
        + while (cl != null)
        + {
        + if (cl.getClass().isAssignableFrom(jnlpClassLoaderClass)) {
        + Method findLibMethod = jnlpClassLoaderClass.getDeclaredMethod(
        "findLibrary", new Class[] { String.class }

        );

      • String jdicLibURL = (String) findLibMethod.invoke(cl,
        + String jdicLibURL = (String) findLibMethod.invoke(cl,
        new Object[] { "jdic" }

        );

      • jdicLibFolder = (new File(jdicLibURL)).getParentFile()
        + jdicLibFolder = (new File(jdicLibURL)).getParentFile()
        .getCanonicalPath();
      • WebBrowserUtil.trace("running path " + jdicNativeLibPath);
      • isShareNativeInitialized = true;
      • } else { - throw new JdicInitException( - "Unexpected ClassLoader for webstart, only Sun's com.sun.jnlp.JNLPClassLoader is supported,while current classloader is " - + cl.getClass().getName()); + WebBrowserUtil.trace("running path " + jdicNativeLibPath); + isShareNativeInitialized = true; + return jdicLibFolder; + }

        else

        { + cl = cl.getParent(); + }

        }
        + throw new JdicInitException(
        + "Unexpected ClassLoader for webstart, only Sun's
        com.sun.jnlp.JNLPClassLoader is supported,while current classloader is "
        + + cl.getClass().getName());
        } catch (Exception e)

        { WebBrowserUtil.error(e.getMessage()); e.printStackTrace(); throw new JdicInitException(e.getMessage()); }
      • return jdicLibFolder;
        }

        Activity

        Hide
        jdouglas added a comment -

        Created an attachment (id=305)
        PATCH

        Show
        jdouglas added a comment - Created an attachment (id=305) PATCH

          People

          • Assignee:
            michael_shan
            Reporter:
            jdouglas
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: