Open gradinac opened 3 years ago
I don't think java.desktop is supported. AWT/Swing is not, so you can safely assume that any dependency from java.desktop will not work. (this is not because Graal has issues, this is because awt/swing is written this way)
how to solve it?
The following simple program attempts to find the default printer service: Printer.java:
Compiling and running it on the JVM on a machine without a printing service leads to:
However, building and running the same program as a native-image leads to:
This crash shouldn't happen on native - I suspect the most likely reason for it is not adding the AWT libraries that contain this method to the image.
This issue is reproducible on Java 11, Linux-AMD64 - on master.