CasaDelGato
CasaDelGato

Reputation: 1283

Can javapackager generate just .app instead of .dmg?

We are updating our Mac support from Java 1.6 to Java 1.8. Part of this is switching to using javapackager to generate the .app bundle. The problem is that it always puts the .app into a .dmg. I need the .app separate so we can build our full installer.

Is there any way to convince javapackager to just generate the .app?

Upvotes: 1

Views: 460

Answers (2)

Chris Bensen
Chris Bensen

Reputation: 271

There was a bug fixed in the Java Packager where "-native image" didn't work. I know this has been fixed for JDK 9 but I don't believe it has been backported yet. If you are using JDK 8, "-native" or "-native all" should generate all possible output, but it will take a bit longer.

Upvotes: 0

Géry Ogam
Géry Ogam

Reputation: 8027

Just use the option -native image (can be all—the default—, image, installer, or platform-specific installer formats, see Oracle's documentation):

$ javapackager -deploy -native image -srcdir <src_dir> -outdir <out_dir> -outfile <out_file>

Upvotes: 2

Related Questions