A Java application can be packaged in various ways. Read the Java Packaging Overview to find all about it. One of the packages is a self-contained Java application .
There are various ways to create these packages:
- Use the
javapackager tools that come with your JDK - JavaFX Ant Tasks
- JavaFX Maven plugin for maven project
A standalone application is a way in which your application can be packaged and platform specific. Package contains:
- Application package
- Private copy of JRE
A list of available packages can be found here .
Let's look at the tools we have and how to use them:
JavaPackager Tool
The JavaPackager tool is the easiest tool and allows you to compile, package, sign and deploy your Java (FX) applications without writing any additional scripts. The javapackager.jar file is located in the bin directory of the JDK installation.
A list of commands that can be used with it is available here .
JavaFX Ant Tasks
JavaFX Ant Tasks helps you pack your application by simply creating a build.xml file for your project.
A set of examples of using Ant scripts for your project can be found here .
A list of commands that can be used for it is available here .
JavaFX Maven Plugin
JavaFX Maven Plugin uses the use of the java application for packaging on the maven platform. You can pack it into a maven-based java application by adding a plugin to the project.
This plugin is IMHO if easiest use of the three. This is a very well written, understandable tool and extensive documentation.
JavaFX Gradle Plugin
The JavaFX Gradle Plugin is also owned by the maven plugin author. It has all the functions that the maven plugin has, but for Gradle :)
Further reading:
Itachi uchiha
source share