B4J Tutorial Creating a Mac package with B4JPackager11


Staff member
Licensed User
Creating a standalone Windows package is simple with the internal packager: https://www.b4x.com/android/forum/threads/117880/#content
Creating a similar package for Linux or Mac is a bit more complicated. Also note that the result will include a bash script that starts the program, unlike the executable in the Windows package.

Mac example:
https://www.b4x.com/b4j/files/MacAngryBirdsExample.zip (35mb)
You can run it by unzipping the package and clicking on run.command.


Creating it is done with:
  • Run the project locally (on Windows) to generate the compiled jar. It will be in the Objects folder. Copy it to the Mac.
  • Connect with B4J-Bridge to the mac. You need to run B4J-Bridge with Java 11+ downloaded from: https://www.b4x.com/android/forum/t...lest-way-to-distribute-ui-apps.99835/#content
    jdk-14.0.1/Contents/Home/bin/java -jar b4j-bridge.jar
  • Open B4J-Packager11 in the IDE and set the InputJar parameter.
    Private InputJar As String = "/users/username/Downloads/AngryBirds.jar"
  • Run it and the package will be created on the Mac. You need to distribute all the files under the build folder.

You might need to make more configurations as explained here: https://www.b4x.com/android/forum/t...-way-to-distribute-standalone-ui-apps.117880/