Create universal binary for Mac OS with OpenJDK jpackage - application launcher is x64

Viewed 58

I'm using OpenJDK 18.0.1.1 with jlink and jpackage to create apps with a bundled JRE from our application. I'm using a new Macbook with M1 processor and I'm calling:

jpackage create-app-image \
-o "/Workspace/" \
-i /Workspace/installer \
-n MyAppName \
--runtime-image $RUNTIMEJDK/myruntime \
--main-class company.myapp.mainclass \
--main-jar mainclass.jar \
--icon  /Workspace/icons/MyAppName.icns \
--vendor "myCompany" \
--description "This is my application"

When I call

lipo -info /Workspace/MyAppName.app/Contents/MacOS/MyAppName

the architecture is x86_64. My OpenJDK is arm64.

How can I tell jpackage to create an arm64 app?

0 Answers
Related