[jdk8u-dev] RFR: 8278138: OpenJDK8 fails to start on Windows 8.1 after upgrading compiler to VS2017

Joakim Nordström jnordstrom at openjdk.java.net
Mon Apr 11 19:23:39 UTC 2022


On Tue, 29 Mar 2022 06:43:24 GMT, ktakakuri <duke at openjdk.java.net> wrote:

> Could you please review the 8278138 bug fixes?
> 
> This problem is caused by missing DLL's which vcruntime140.dll depends on.
> I think it is needed to copy the missing DLL's into jdk/bin as like jdk/jre/bin.
> I fix to copy api-ms-win-*.dll files to jdk/bin when images directory is created.

Hi,
Thank you for looking into this.
I've found that only copying the api-ms-* DLLs isn't sufficient. You also need to copy ucrtbase.dll among others. Instead of relying on the name, you can simply add all files from the the redistributable UCRT directory, in the same manner as in [CopyFiles.gmk.](https://github.com/openjdk/jdk8u-dev/blob/master/jdk/make/CopyFiles.gmk#L250)

jdk/make/Images.gmk line 149:

> 147:     $(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \
> 148:     $(notdir $(MSVCR_DLL)) \
> 149:     $(wildcard $(JDK_OUTPUTDIR)/bin/api-ms-win-*.dll)

By adding msvcp DLL, and all DLLs from the redistributable UCRT directory, we should get all files needed.
Suggestion:

    $(notdir $(MSVCP_DLL))

ifneq ($(UCRT_DLL_DIR), )
  WINDOWS_JDK_BIN_FILES += $(notdir $(wildcard $(UCRT_DLL_DIR)/*.dll))
endif

-------------

Changes requested by jnordstrom (no project role).

PR: https://git.openjdk.java.net/jdk8u-dev/pull/25


More information about the jdk8u-dev mailing list