requesting review on JDK-8348828: Windows dll loading now resolves symlinks

Benjamin Peterson benjamin at engflow.com
Tue Oct 7 15:15:41 UTC 2025


I've had a PR for the native library loading code up for a months that
I'd appreciate any review on:
https://github.com/openjdk/jdk/pull/24694

To summarize the issue and proposed fix: Before OpenJDK 24,
System.loadLibrary on Windows passed symbolic links unresolved to the
underlying LoadLibrary function. JDK-8003887 caused symbolic links to
be resolved by Java before the system LoadLibrary function.
Unfortunately, LoadLibrary is clever and may mangle the filename
passed to it, which means passing a symlink may not have the same
behavior as presenting the fully resolved path. I propose to fix this
problem in the PR by disabling LoadLibrary's clever mangling behavior.

Thank you for your time,
Benjamin


More information about the core-libs-dev mailing list