When my application is built as a native-image with gluonfx:nativeBuild, and I run the application (gluonfx:nativeRun) I get the following error:
java.lang.UnsatisfiedLinkError: no awt in java.library.path
This happens in my code where I read a file (or URL) and save as a BufferedImage. I have used ImageIO.read() but also tried with apache-commons-imaging with same results.
try(InputStream is = connection.getInputStream()) {
image = Imaging.getBufferedImage(is);
}
try(InputStream is = ImageUtils.class.getResourceAsStream(path)) {
image = Imaging.getBufferedImage(is);
}
I have tested this on Linux and MacOS with same result.
Works fine when running normally (not natively).