We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b03f147 commit 87d1985Copy full SHA for 87d1985
1 file changed
substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/NativeLibraries.java
@@ -167,6 +167,14 @@ private boolean loadBuiltinDarwinLibraryAbsoluteFallback(File file) {
167
if (builtInName == null) {
168
return false;
169
}
170
+ if (file.exists()) {
171
+ /*
172
+ * Preserve System.load(<absolute path>) semantics for real files. The fallback is only
173
+ * intended for builtin JDK libraries whose image/java.home path does not exist as a
174
+ * loadable dylib in the generated image.
175
+ */
176
+ return false;
177
+ }
178
try {
179
return isBuiltinDarwinLibraryLocation(file) && addLibrary(builtInName, true);
180
} catch (IOException e) {
0 commit comments