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

Support AWT Image IO in native image #13567

Closed
galderz opened this issue Nov 30, 2020 · 9 comments · Fixed by #20850
Closed

Support AWT Image IO in native image #13567

galderz opened this issue Nov 30, 2020 · 9 comments · Fixed by #20850
Labels
kind/enhancement New feature or request
Milestone

Comments

@galderz
Copy link
Member

galderz commented Nov 30, 2020

An extension, new or existing, should add the following to support AWT Image IO in native image. See attached JSON files containing write and read registration registrations.

imageio-read-native-image-config.zip
imageio-write-native-image-config.zip

@galderz
Copy link
Member Author

galderz commented Nov 30, 2020

Credit to @jerboaa who came up with the the instructions to get all of this working 👏. Note that as @jerboaa mentions in that issue, jpg is not yet fully working. More details in oracle/graal#3031.

@gsmet
Copy link
Member

gsmet commented Nov 30, 2020

@jerboaa
Copy link
Contributor

jerboaa commented Nov 30, 2020

An extension, new or existing, should add the following to support AWT Image IO in native image. See attached JSON files containing write and read registration registrations.

imageio-read-native-image-config.zip
imageio-write-native-image-config.zip

Thanks @galderz

Note that the config is highly dependent on the JDK code in use. JDK 11.0.8+11 might need slightly different config to JDK 11.0.10.

Consider perhaps to drive the app from java first (with the native-image-agent running). That would generate the config on-the-fly. As a second step, produce the native image with the config in META-INF/native-image that got produced in step 1. See this for an example: graalvm/mandrel#180 (comment)

@galderz
Copy link
Member Author

galderz commented Dec 2, 2020

@gsmet But according to the description of the issue in graalvm/mandrel#180, the tweaks available are not enough, otherwise you'd not get the NoSuchMethodError. Converting @jerboaa's example into a test would be desirable too, if no similar tests exist?

Also, could this be a good first native issue for the community?

@gsmet
Copy link
Member

gsmet commented Dec 3, 2020

@galderz I wasn't saying no additional work was needed, just that we had preliminary work there.

BTW, this is blocking the GraalVM 20.3 upgrade, things that used to work don't work anymore:

#13644 (comment)

@zakkak
Copy link
Contributor

zakkak commented Dec 4, 2020

BTW, this is blocking the GraalVM 20.3 upgrade, things that used to work don't work anymore

I tested the code examples from graalvm/mandrel#180 (comment) with GraalVM 20.2 as well and they don't work there either. So I think that this specific issue is not related to the 20.3 upgrade and doesn't need to be resolved for Quarkus to move to upgrade to 20.3.

@jerboaa
Copy link
Contributor

jerboaa commented Dec 4, 2020

BTW, this is blocking the GraalVM 20.3 upgrade, things that used to work don't work anymore

I tested the code examples from graalvm/mandrel#180 (comment) with GraalVM 20.2 as well and they don't work there either. So I think that this specific issue is not related to the 20.3 upgrade and doesn't need to be resolved for Quarkus to move to upgrade to 20.3.

Thanks for testing it, @zakkak. I would have been surprised if it was any other way.

@rsvoboda
Copy link
Member

rsvoboda commented Jan 8, 2021

Quarkus 1.11 CR1 is released, it comes with GraalVM 20.3 support. Is this going to get fixed before .Final?

@zakkak
Copy link
Contributor

zakkak commented Jan 8, 2021

@rsvoboda I think it won't.

Note that this issue is about a feature and not a bug.
The AWT related issues (resulting in the imageIO test failing) discussed in #13954 should be fixed before .Final though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants