I have created a run time image for my Java application using jlink and I would like to be able to ship my app as an executable to different platforms.
Ideally, it woul
Yes, as of Java 8 there are two ways of doing this, using the javapackager tool, or the JavaFX Ant Tasks (which aren't actually specific to JavaFX, and are provided with the Java 8 JDK).
Here's an example of packaging an application as a Jar, setting the main-class and classpath attributes, and copying all the dependencies into a folder, using Maven.
maven-dependency-plugin
package
copy-dependencies
${project.build.directory}/lib
maven-jar-plugin
3.2.0
true
${project.groupId}.${project.artifactId}.DemoCLI
And here is the Ant build file to package the standalone application (exe for Windows, .app and .dmg on OS X, .deb and .rpm on Linux).
Using Java from ${java.home}