Questions tagged [javapackager]

The Java Packager tool can be used to compile, package, sign, and deploy Java and JavaFX applications from the command line. It can be used as an alternative to an Ant task or building the applications in an IDE.

The Java Packager tool generates executable Java/JavaFX applications for Windows, Linux, and macOS platforms. It can also generate installers for those platforms in various formats including DMG or PKG on macOS, MSI on Windows, and RPM or DEB on Linux. Also supports generating packages for distribution on the Mac App Store including jar signing.

Documentation for the command is available here: https://docs.oracle.com/javase/9/tools/javapackager.htm#JSWOR719

Questions related to usage of the command, command options, or errors obtained when using it are welcome.

74 questions
3
votes
1 answer

Error when trying to package native image with javapackager in java 9-ea?

I'm trying out java 9-ea (jdk-9+180) and the new javapackager to create a native image from a simple module but I get a nullpointer exception. Anyone know if I'm just too early or if I'm not using the right command switches in order to get it to…
jbilander
  • 611
  • 4
  • 15
3
votes
1 answer

How can I change the icon used by javapackager for .pkg installers?

Using javapackager under Mac OS X 10.12, I can generate a .pkg file. This package, when opened, contains a generic gray-colored icon, as shown in the image below: How can I change the generic icon to one of my own choosing? I am currently using the…
mhucka
  • 2,143
  • 26
  • 41
3
votes
1 answer

Broken -Bmac.CFBundleVersion option in javapackager

On macOS, the command-line option -Bmac.CFBundleVersion= specified in the documentation of Oracle javapackager utility does not work. I am using the following command to create the disk image Application.app from Application.jar: javapackager…
Géry Ogam
  • 6,336
  • 4
  • 38
  • 67
3
votes
1 answer

Package JRE for Java application

My goal is to to package a standalone JRE alongside with my Java application via Maven, automatically. In order to achieve this, I use exec-maven-plugin and javapackager from JDK. My POM setting looks like this:
PAX
  • 1,056
  • 15
  • 33
2
votes
0 answers

IO Exception in Java Packager: Exec failed with code 2 command

I want to create executable bundle for windows from java's jar application using the javapackager but facing issues. Running cmd command javapackager -deploy -native -outdir packages -outfile Final -srcdir . -srcfiles Hello.jar -appclass…
Waqas Ahmed
  • 41
  • 1
  • 7
2
votes
1 answer

How to pass program arguments to java packager?

I'm trying to create a native executable out of a .jar file I have locally. All looks fine except that I'm currently executing the jar file with an argument (abc): java -Dappbase=http://localhost:80/getdown/xyz/ -jar getdown-1.7.1.jar abc This is…
devoured elysium
  • 101,373
  • 131
  • 340
  • 557
2
votes
1 answer

JDK9 Packager: Create image without runtime

When using the Java Packager in Java 8, one had the choice to not include a runtime in the resulting image (see for example this question). I'm trying to achieve the same (using the ant tasks described over here). However I don't know how to not…
Sebastian S
  • 4,420
  • 4
  • 34
  • 63
2
votes
2 answers

unable to use javapackager command

I am using ubuntu 16.04, and my java is in /usr/bin/java and jdk is in /usr/lib/jvm/java-8-openjdk-amd64 . non of these had the javapackager inside. I am not able to use javapackager command and do not know how to configure it to use in…
RRy
  • 433
  • 1
  • 5
  • 15
2
votes
1 answer

Javapackager tool from command-line on OSX?

javapackager and javafxpackager don't seem to be recognised on the command line for me. They don't show up in the terminal, even after I installed the latest 1.8 SDK. (Even 'echo $JAVA_HOME' seems to be drawing a blank, though java -version seems…
Morgan Allen
  • 33
  • 1
  • 7
2
votes
1 answer

Javapackager – native packaging / self-contained apps additional information

I am able to make native package / self-contained app but I do not know how to specify additional information such as vendor name, version number etc. Where can I found list of these properties and how can I set them for package?
Yarl
  • 728
  • 1
  • 7
  • 26
1
vote
1 answer

How can I set the MacOS DMG volume icon using Java 17's jpackage utility?

I'm creating a DMG installation package for my java application for use on OSX. I have the following script that creates a resources directory, puts some files in it, then runs the jpackage command to actually create the DMG. The problem is that…
1
vote
1 answer

Package and install a xxx.desktop file with javapackager

I've packaged an application with Maven's JavaPackager plugin targetting Linux. Everything is working fine except that I don't find how to package and install a "xxxx.desktop" file for my application. Without this file, 1/ the icon on the launcher…
lvr123
  • 524
  • 6
  • 24
1
vote
1 answer

How to modify the default bundle name made by JavaPackager

In the JavaPackager documentation the default bundle names are described. For example, for a zip file: "${name}-${version}-${platform}.zip" I'd like to change those. For example having : "${name}-${version}-${platform}-Full.zip" for the bundle…
lvr123
  • 524
  • 6
  • 24
1
vote
1 answer

Changing JavaPackager Temporary Output Directory

I am attempting to bundle a Windows installer using InnoSetup5/JavaPackager. https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javapackager.html Part of the packaging process involves the creation and use of temporary files in a…
Graham Meehan
  • 445
  • 5
  • 18
1
vote
0 answers

Java packager - preinstall & preuninstall

I am looking at a way to package java application as an installer for windows I looked at this example and I was able to achieve it - https://github.com/jonashackt/springboot2exe Simply put, this is the command that I am executing currently to…
Chandan
  • 640
  • 4
  • 10