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

jvm.dll wants MSVCR*.DLL in current working directory but does not search in %JAVA_HOME%\bin

XMLWordPrintable

    • x86
    • windows_10

      Steps to reproduce:
      * Install Microsoft Windows 10, 2012 or later (you cannot reproduce with any older Windows)
      * Install Oracle JRE 1.8.0_102
      * Write a C-program which invokes LoadLibrary("jvm.dll") without specifying a current working directory.
      * Set current working directory to anything else but not %JAVA_HOME%\bin and start the C-program.

      Expected result:
      * LoadLibrary returns a valid handle

      Actual result:
      * LoadLibrary fails

      Notes:
      * A simple workaround is to copy MSVCR100.DLL from %JAVA_HOME%\bin to the current working directory.
      * This does not occur in Windows 7 because that version of the operating system provides a copy of MSVCR100.DLL as part of the SysWow64 operating system folder, which hence is found by LoadLibrary as part of the library search path. Windows 10 and later do not provide such a copy, hence the error will show up.

            Unassigned Unassigned
            mkarg Markus Karg
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: