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
15
votes
2 answers

Failed to find library: jvm.dll. What's going on here?

In some computers, but not all, in which my application is installed, after what looks like a successful install, when you try to run it, it shows this error: The file is present in that directory, so, I'm not sure why it says it failed to find the…
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
10
votes
3 answers

Is there a way to build installers for a java application for multiple targets on the same platform?

I would like to build a .msi, .deb, and .pkg from the same source tree and on the same machine. Distributable runtimes for Java9+ are no longer downloadable, so perfectly sane solutions like launch4j+nsis no longer work. javapackager has been…
nyet
  • 482
  • 2
  • 13
9
votes
3 answers

How to package app at Java 11 with non-modular dependencies

I develop and distribute a Java Swing app that uses Apache Batik and JavaCV. I've updated it through java 1.6, 7 and 8. Installers for macOS, Windows and Linux are built with Javapackager. Java 8 is end of support in Jan '19 and I can't find a…
Hamish258
  • 305
  • 2
  • 9
8
votes
2 answers

Limit modules added by javapackager

I am trying to reduce the size of my application by limiting the modules that it includes. I already did this for my runtime using jlink. However, when I run javapackager using the --add-modules and --limit-modules options with a comma-separated…
GabeV
  • 859
  • 8
  • 21
7
votes
1 answer

The javapackager is unable to generate a dmg on macOS

I am trying to generate a dmg from a jar using the javapackager. Here is what I put into terminal: cd "/Users/name/Documents/JarToApplication" jdk=$(/usr/libexec/java_home -v 1.8) $jdk/bin/javapackager -deploy -native dmg -BappVersion=8 -name…
Blockhead7360
  • 145
  • 10
7
votes
0 answers

Native bundle created with javapackager on 8u171/172 includes much more files

I run the following command to create a native bundle for a .jar file: javapackager.exe -deploy -native image -srcfiles -appclass -outdir out -outfile test Using Java 8u171/172 the bundles/AppName/ folder (containing the .exe for…
user2375667
  • 463
  • 3
  • 10
7
votes
1 answer

Can a jlinked runtime be deployed with javapackager?

The instructions to javapackager just above Example 2-1 in the Java SE Deployment Guide/Self-Contained Application Packaging state that a jar file is required in the -deploy command. If I use a modular jar, I get this error message: Exception:…
Phil Freihofner
  • 7,645
  • 1
  • 20
  • 41
6
votes
2 answers

How to generate an executable of a modular Java app with javapackager?

Environment: Win10, Oracle JDK 9, Eclipse, jlink, javapackager Context: I'm trying to generate an executable file with javapackager having a java custom runtime image made with jlink, reading the javapackager documentation. Not an…
tec
  • 999
  • 3
  • 18
  • 40
6
votes
1 answer

icns file not found error with javapackager on macOS High Sierra

I just installed macOS High Sierra (10.13) and am attempting to update a tutorial I wrote that shows how to packaging a Java Swing application (executable JAR) into a macOS installer. The tutorial's steps worked fine on macOS Serra (10.12). Now the…
Dem Pilafian
  • 5,625
  • 6
  • 39
  • 67
5
votes
2 answers

Java9 packager with jlink compress tags

when we create jlink runtime images we can use tags such as '--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages' , creating a distribution folder around 45mb. If we want to use javapackager, for example to create an .DMG file,…
5
votes
2 answers

How to find automatic modules with javapackager

I am bundling an app using javapackager wherein the main jar is a module with a module-info.class but it relies on many other jars that are plain old jars, so I call them out as automatic modules in module-info.java. However, javapackager complains…
GabeV
  • 859
  • 8
  • 21
5
votes
1 answer

adding icon to bundle using javapackager

i am using javapackager to create an exe installer with jre bundled using the command line. does anybody know how to add an icon and customise the installer using the command line. these are the commands that i use: javapackager -deploy -native…
Dwayne Patel
  • 315
  • 2
  • 13
4
votes
0 answers

javapackager: Cannot determine which JRE/JDK exists in the specified runtime directory. MacOS Big Sur

When I run javapackager \ -deploy \ -Bruntime="/Users/david/Library/Java/JavaVirtualMachines/openjdk-15.0.2/Contents/Home" \ -native image \ -name "Sermon Viewer" \ -title "Sermon Viewer" \ -srcdir . \ -outdir . \ -srcfiles SermonViewer.jar…
John Smith
  • 3,493
  • 3
  • 25
  • 52
3
votes
1 answer

Is it possible to use javapackager on ZuluFX for Mac

I was able to use ZuluFX 8 with javapackager on Windows. However, on a Mac I get this error: Bundler Mac Application Image skipped because of a configuration problem: Cannot determine which JRE/JDK exists in the specified runtime directory. …
Shai Almog
  • 51,749
  • 5
  • 35
  • 65
3
votes
2 answers

How can I specify a classpath for executables created with javapackager?

The javapackager command in Java 8 is able to create standalone executables. The examples on the web usually only use a single jar file, but I have several jar files that need to be bundled into the application. The documentation states that it is…
ukor
  • 68
  • 6
1
2 3 4 5