0 Replies Latest reply on Jan 13, 2013 12:18 PM by 984537

    Update To JRE7, can not load nativelib  jar, but use JRE6 works fine.

      For my JNLP file , there is some nativelib info like below:
                     <resources os="Windows">
                          <nativelib href="lib/x264-win.jar" />
                     <resources os="SunOS" arch="sparc">
                          <nativelib href="lib/x264-SunOS-sparc.jar" />
                     <resources os="SunOS" arch="x86">
                          <nativelib href="lib/x264-SunOS-x86.jar" />
      Whe I Update To JRE7, can not load nativelib jar, but JRE6 works fine.

      The load nativelib code like below:

      String source = "x264.jar";
      ClassLoader cl = Thread.currentThread().getContextClassLoader();
      URL url= cl.getResource(source);

      "x264.jar" is one jar in x264-win.jar,lib/x264-SunOS-sparc.jar or lib/x264-SunOS-x86.jar.

      When I used JRE6 to load x264.jar, it worked fine.
      But when I updated to JRE7, it can not load x264.jar.

      When use JRE6, url would be"x264.jar" info, like jar:http://localhost:8080/JNLP.jar!/x264.jar, but use JRE7, url would be null, and I found code not load nativelib "x264.jar", so

      Does any one have find JRE7 can not load nativelib.jar?
      Is the problem of using Thread.currentThread().getContextClassLoader() to load "x264.jar"?

      帖子经 981534编辑过