flow
flow copied to clipboard
Hilla app with @PWA annotation fails when running as native compiled image on macOS
Describe the bug
A Hilla app with @PWA
annotation throws an exception when running as native compiled image:
java.lang.UnsatisfiedLinkError: No awt in java.library.path
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.NativeLibrarySupport.loadLibraryRelative(NativeLibrarySupport.java:136) ~[na:na]
Expected-behavior
A Hilla app with @PWA
annotation should not throw unexpected exceptions when running as native compiled image.
Reproduction
Create a new Hilla project:
npx @hilla/cli@latest init --next hilla-native-pwa
Add @PWA(name = "Hilla PWA", shortName = "PWA")
to src/main/java/com/example/application/Application.java
.
Compile Hilla app to native image:
./mvnw clean package -Pproduction -Pnative native:compile
Run Hilla app as native compiled image:
./target/hilla-native-pwa
System Info
Hilla: 24.4.0.beta5 Hilla CLI: 2.0.1 Java: 21.0.2 (OpenJDK Runtime Environment GraalVM CE 21.0.2+13.1 - build 21.0.2+13-jvmci-23.1-b30) OS: macOS Sonoma 14.4.1 (23E224)