Closed plankp closed 11 months ago
Swing requires AWT and that is not yet supported by native-image
. It does not mean it is not possible but it is not trivial to support.
It would be very nice to see that native-image support will support Swing/Java2D, which will bring Java on client to the next level.
hi @plankp , this issue has been inactive for more than 180 days. We’ll close it to focus on current issues. In case it’s still relevant, please reopen it and we’ll take another look. Thank you!
This issue is likely fixed in the latest release.
Take a very simple GUI app:
After compiling it with
javac
and making sure it runs, runningnative-image
on it results in the following error:Adding the flags
--delay-class-initialization-to-runtime
onDummyClass
still results in the same error and apply it onsun.java2d.opengl.OGLRenderQueue
results in the following:Is using
native-image
on swing not supported? Or what is the workaround for this? (Or am I misunderstanding hownative-image
works? I am using debian 9.5.0)