Please review,
When jlink with --compress=2, zip is used to compress the files while doing
copy. The user case failed to load zip.dll, since zip.dll is not set in PATH.
This failure is after we get NULL from GetModuleHandle("zip.dll"), then do
LoadLibrary("zip.dll") will have same result.
The fix is calling load_zip_library of ClassLoader first --- if zip library
already loaded just return the cached handle for following usage, if not, load
zip library and cached the handle.
Tests: tier1,4,7 in test
Manually tested user case, and checked output of jimage list <modules> for
jlinked files using --compress=2.
Thanks
Yumin
-------------
Commit messages:
- 8278753: Runtime crashes with access violation during JNI_CreateJavaVM call
Changes: https://git.openjdk.java.net/jdk/pull/7206/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7206&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8278753
Stats: 49 lines in 6 files changed: 18 ins; 14 del; 17 mod
Patch: https://git.openjdk.java.net/jdk/pull/7206.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7206/head:pull/7206
PR: https://git.openjdk.java.net/jdk/pull/7206