B4J Question Install app on MAC

cstangor

Member
Licensed User
Longtime User
I don't and never have had an apple computer, but I'd like my B4J app to be able to run on one. Can someone please help me with the proper procedure for creating the MAC exec file from B4j?

Thanks in advance.
 

cstangor

Member
Licensed User
Longtime User
So the equivalent of an .exe file on MAC is a .jar file? It's started directly from the java command? Is that right?
 
Upvote 0

nwhitfield

Active Member
Licensed User
Longtime User
It is also possible to create a Macintosh 'app bundle' which means that your compiled results will look like any other app on the Mac; when someone inspects them, it'll say 'Application' as the type, there'll be an icon of your choosing, and so on. The app bundle contains all the required libraries as well.

There seem to be a lot of instructions around for this, and I've not tried any myself, but the page at http://informagen.com/JarBundler/ was updated only a couple of months ago, so should still be pretty up to date. A similar tool can be found at https://java.net/projects/appbundler and there are others you can find on StackOverflow.

The typical way that you would distribute a Mac app like this is to create the app bundle, then create a disk image file (dmg) using Disk Utility, and put a copy of of the app inside the disk image. Mac users are very well versed in opening a DMG (which mounts the disk on their desktop) and dragging the app to the Applications folder to install it on their hard drive. The eBay tool JBidwatcher, which is written in Java, is distributed for Mac in this way, as well as an exe for Windows or as a plain Jar for people who enjoy the Star Wars prequels.

Going down the app bundling route will give a result that looks as much like a Mac application as possible. But if you don't want to do that then yes, a Mac user can double click the Jar file and it should by default be opened using the Jar launcher.
 
Last edited:
Upvote 0

dilettante

Active Member
Licensed User
Longtime User
The typical way that you would distribute a Mac app like this is to create the app bundle, then create a disk image file (dmg) using Disk Utility, and put a copy of of the app inside the disk image. Mac users are very well versed in opening a DMG (which mounts the disk on their desktop) and dragging the app to the Applications folder to install it on their hard drive. The eBay tool JBidwatcher, which is written in Java, is distributed for Mac in this way, as well as an exe for Windows or as a plain Jar for people who enjoy the Star Wars prequels.

Oof.

First thing that popped into my head was that old tune from Elementary School days:


Jump down turn around
pick a bale of cotton,
jump down turn around
pick a bale a day.
 
Upvote 0
Top