在8u171 / 172上使用javapackager创建的本机包包含更多文件

时间:2018-05-25 09:41:32

标签: java javapackager

我运行以下命令为.jar文件创建本机包:

javapackager.exe -deploy -native image -srcfiles <files> -appclass <class> -outdir out -outfile test

使用Java 8u171 / 172 bundles/AppName/文件夹(包含.exe用于启动Java应用程序和其他一些东西)包含以下DLL文件:

api-ms-win-core-console-l1-1-0.dll
api-ms-win-core-datetime-l1-1-0.dll
api-ms-win-core-debug-l1-1-0.dll
api-ms-win-core-errorhandling-l1-1-0.dll
api-ms-win-core-file-l1-1-0.dll
api-ms-win-core-file-l1-2-0.dll
api-ms-win-core-file-l2-1-0.dll
api-ms-win-core-handle-l1-1-0.dll
api-ms-win-core-heap-l1-1-0.dll
api-ms-win-core-interlocked-l1-1-0.dll
api-ms-win-core-libraryloader-l1-1-0.dll
api-ms-win-core-localization-l1-2-0.dll
api-ms-win-core-memory-l1-1-0.dll
api-ms-win-core-namedpipe-l1-1-0.dll
api-ms-win-core-processenvironment-l1-1-0.dll
api-ms-win-core-processthreads-l1-1-0.dll
api-ms-win-core-processthreads-l1-1-1.dll
api-ms-win-core-profile-l1-1-0.dll
api-ms-win-core-rtlsupport-l1-1-0.dll
api-ms-win-core-string-l1-1-0.dll
api-ms-win-core-synch-l1-1-0.dll
api-ms-win-core-synch-l1-2-0.dll
api-ms-win-core-sysinfo-l1-1-0.dll
api-ms-win-core-timezone-l1-1-0.dll
api-ms-win-core-util-l1-1-0.dll
api-ms-win-crt-conio-l1-1-0.dll
api-ms-win-crt-convert-l1-1-0.dll
api-ms-win-crt-environment-l1-1-0.dll
api-ms-win-crt-filesystem-l1-1-0.dll
api-ms-win-crt-heap-l1-1-0.dll
api-ms-win-crt-locale-l1-1-0.dll
api-ms-win-crt-math-l1-1-0.dll
api-ms-win-crt-multibyte-l1-1-0.dll
api-ms-win-crt-private-l1-1-0.dll
api-ms-win-crt-process-l1-1-0.dll
api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-crt-stdio-l1-1-0.dll
api-ms-win-crt-string-l1-1-0.dll
api-ms-win-crt-time-l1-1-0.dll
api-ms-win-crt-utility-l1-1-0.dll
msvcp140.dll
msvcr100.dll
packager.dll
ucrtbase.dll
vcruntime140.dll

其中大多数似乎也出现在runtime/bin/子文件夹中。

与此相反,使用Java 8u161运行相同的javapackager命令只会导致包含以下DLL文件(除了.exe和其他内容之外):

msvcp140.dll
packager.dll
vcruntime140.dll

我认为8u161实际上是缺少msvcr100.dll(根据this bug),但是看起来更合理。

我真的需要捆绑文件夹中的所有api-ms-win-* DLL吗?请注意,它们仍然可以在runtime/bin/文件夹中供所包含的JRE使用,但不知怎的,我无法想象它们是初始执行AppName.exe所必需的。

我发现this OpenJDK commit似乎反映了这种变化。它修复了8u161中提到的问题,添加api-ms-win-* DLL似乎是故意的。我仍然不相信所有这些都是必需的,尽管除了看起来很奇怪之外我没有其他理由。如果没有它们,应用程序似乎运行良好,但当然我无法确定在任何情况下情况都是如此。

0 个答案:

没有答案