B4J Question jPackage for B4j jar-Files for macOS

David Meier

Active Member
Licensed User
Longtime User
Hi
With java 14 comes jPackage. This tool allows for creating an embedded java package together with your b4j-application as a mac installer. This could be very interesting for macOS. On Windows Erel's integrated solution is perfect. jPackage would be a superb solution for the mac. Unfortunately I did not succeed in packaging my jar. So if anybody else shares my interest on bringing b4j-Java-Applications to the mac then any help or suggestion is appreciated.
Here you can find some more information on the topic:

The commands I used:
B4X:
dmeier@Davids-MacBook-Pro bin % ./jlink --output jdk-14+fx  --module-path /Users/dmeier/Documents/IT/b4j/jdk-14.0.1/Contents/Home/javafx/javafx-jmods --add-modules  javafx.web,javafx.media,javafx.fxml,java.logging,java.base
dmeier@Davids-MacBook-Pro bin % ./jpackage --input /Users/dmeier/Documents/IT/b4j/jpackage --name GiroScanDemo --main-jar giroscan.jar --runtime-image jdk-14+fx --type dmg

With these commands I can package my app but when starting the installed App-Package I get the error:
B4X:
This application requires a newer version of the Java runtime. Please download and install the latest Java runtime from java.com. Then restart the application.

Kind regards

PS: If you need an immediate alternative solution, this worked for me: https://www.b4x.com/android/forum/t...ing-b4j-jar-file-as-macos-app-bundles.119021/
 
Top