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

unable to find nativelib on windows when case-sensitivity mismatch

    XMLWordPrintable

Details

    • b44
    • x86_64
    • windows_7

    Backports

      Description

        FULL PRODUCT VERSION :
        java version "1.8.0_20"
        Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
        Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

        ADDITIONAL OS VERSION INFORMATION :
        Windows 7 x64
        Microsoft Windows [Version 6.1.7601]

        EXTRA RELEVANT SYSTEM CONFIGURATION :
        Chrome x64

        A DESCRIPTION OF THE PROBLEM :
        JNLP:

        {code:xml}
        ...
             <resources os="Windows" arch="x86_64">
                <jar href="iaikPkcs11Wrapper-1.3.0.jar" />
                <nativelib href="windows64Wrapper-1.3.0.jar" />
                <property name="jnlp.packEnabled" value="false" />
            </resource>
        ...
        {code}

        Log from Java Console:

        {code}
        basic: JNLP2ClassLoader.findLibrary: Looking up native library: pkcs11wrapper.dll
        cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@e1ba27c6: 4
        cache: Looking up native library in: C:\Users\TF\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\26\440f12da-50a630f0-n\pkcs11wrapper.dll
        basic: JNLP2ClassLoader.findLibrary: native library found: null
        basic: JNLP2ClassLoader: Native library pkcs11wrapper not found
        {code}


        The file exists but System.loadlibrary("pkcs11wrapper") ignore files from cache.
        If the same DLL file is located in any path from java.library.path everything is ok.

        On java (x32):
        Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
        Java HotSpot(TM) Client VM (build 25.20-b23, mixed mode, sharing)
        Everything is also OK!

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        1)
        JNLP example:

        {code:xml}
        ...
             <resources os="Windows" arch="x86_64">
                <jar href="iaikPkcs11Wrapper-1.3.0.jar" />
                <nativelib href="windows64Wrapper-1.3.0.jar" />
                <property name="jnlp.packEnabled" value="false" />
            </resource>
        ...
        {code}

        2) In the java code try to load this library by name (Inside windows64Wrapper-1.3.0.jar there is a signed dll file).


        REPRODUCIBILITY :
        This bug can be reproduced always.

        Attachments

          Issue Links

            Activity

              People

                dcherepanov Dmitry Cherepanov
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: