-
Bug
-
Resolution: Unresolved
-
P4
-
24
-
generic
-
windows
A DESCRIPTION OF THE PROBLEM :
In JDK 23, it was possible to build up a Java home directory with symlinks. I.e., make functioning JDK directory where every file in the JDK tree was a symlink to somewhere else. This seems to have regressed on Windows in JDK 24 EA builds. Specifically, the JDK now fails to find critical native libraries on startup.
I suspect this was a downstream consequence of https://github.com/openjdk/jdk/commit/042053c3a82e9fbd4c6866efe872c1c92714e6e7
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Unpack the JDK 24 download zip file on a Windows machine. The JDK is now in a directory called "jdk-24".
Do some powershell commands:
> mv .\jdk-24\bin\jimage.dll rando
> New-Item -Path .\jdk-24\bin\jimage.dll -ItemType SymbolicLink -Value
> .\rando
Attempt to execute javac:
> .\jdk-24\bin\javac
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
javac prints its help message. This is what happens on JDK 23.
ACTUAL -
Error: Unable to load main class com.sun.tools.javac.Main in module jdk.compiler Caused by: java.lang.UnsatisfiedLinkError: .\rando: Can't find dependent libraries
In JDK 23, it was possible to build up a Java home directory with symlinks. I.e., make functioning JDK directory where every file in the JDK tree was a symlink to somewhere else. This seems to have regressed on Windows in JDK 24 EA builds. Specifically, the JDK now fails to find critical native libraries on startup.
I suspect this was a downstream consequence of https://github.com/openjdk/jdk/commit/042053c3a82e9fbd4c6866efe872c1c92714e6e7
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Unpack the JDK 24 download zip file on a Windows machine. The JDK is now in a directory called "jdk-24".
Do some powershell commands:
> mv .\jdk-24\bin\jimage.dll rando
> New-Item -Path .\jdk-24\bin\jimage.dll -ItemType SymbolicLink -Value
> .\rando
Attempt to execute javac:
> .\jdk-24\bin\javac
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
javac prints its help message. This is what happens on JDK 23.
ACTUAL -
Error: Unable to load main class com.sun.tools.javac.Main in module jdk.compiler Caused by: java.lang.UnsatisfiedLinkError: .\rando: Can't find dependent libraries
- relates to
-
JDK-8003887 File.getCanonicalFile() does not resolve symlinks on MS Windows
-
- Resolved
-