From 1d1e39833abad8b33f323f774bb4d3f36b74b8bd Mon Sep 17 00:00:00 2001 From: Severin Gehwolf Date: Fri, 27 Nov 2020 20:42:11 +0100 Subject: [PATCH] Fix UnsatisfiedLinkError when using ImageIO and jpeg Closes #3031 --- .../src/com/oracle/svm/hosted/jdk/JNIRegistrationAwt.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/jdk/JNIRegistrationAwt.java b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/jdk/JNIRegistrationAwt.java index f4874ac2095b..1df4985c2171 100644 --- a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/jdk/JNIRegistrationAwt.java +++ b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/jdk/JNIRegistrationAwt.java @@ -126,6 +126,9 @@ private static void handlePreferencesClassReachable(DuringAnalysisAccess access) } private static void registerJPEG(DuringAnalysisAccess access) { + + PlatformNativeLibrarySupport.singleton().addBuiltinPkgNativePrefix("com_sun_imageio_plugins_jpeg"); + NativeLibraries nativeLibraries = getNativeLibraries(access); NativeLibrarySupport.singleton().preregisterUninitializedBuiltinLibrary("javajpeg");