Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UnsatisfiedLinkError when using ImageIO and jpeg #3032

Merged
merged 1 commit into from
Dec 8, 2020

Conversation

jerboaa
Copy link
Collaborator

@jerboaa jerboaa commented Nov 27, 2020

Closes #3031

@vjovanov
Copy link
Member

vjovanov commented Dec 1, 2020

Thanks a lot for your contribution!

@jerboaa
Copy link
Collaborator Author

jerboaa commented Dec 3, 2020

@gradinac Any thoughts on this one-liner fix?

Note that com_sun_imageio_plugins_jpeg package natives are part of libjavajpeg in OpenJDK. See: http://hg.openjdk.java.net/jdk-updates/jdk11u-dev/file/ab4a1105370a/src/java.desktop/share/native/libjavajpeg/imageioJPEG.c#l1432

@gradinac
Copy link
Contributor

gradinac commented Dec 4, 2020

Hey, @jerboaa! Thank you for your contribution!
The PR looks good to me, I'll try to integrate it and I'll let you know if anything comes up along the way.

@@ -126,6 +126,9 @@ private static void handlePreferencesClassReachable(DuringAnalysisAccess access)
}

private static void registerJPEG(DuringAnalysisAccess access) {

PlatformNativeLibrarySupport.singleton().addBuiltinPkgNativePrefix("com_sun_imageio_plugins_jpeg");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jerboaa
Copy link
Collaborator Author

jerboaa commented Dec 4, 2020

Thanks for the review, @gradinac!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ImageIO app fails to run with UnsatisfiedLinkError when using jpeg image types
4 participants