Performs tasks related to packaging and signing JavaFX applications.
javafxpackager command [options]
The task that should be performed.
One or more options for the command separated by spaces.
You can specify one of the following commands. After the command, specify the options for it.
Converts CSS files into binary form.
Produces a JAR archive according to other parameters.
Assembles the application package for redistribution. By default, the deploy task will generate the base application package, but it can also generate a self-contained application package if requested.
Performs compilation, createjar
, and deploy
steps as one call, with most arguments predefined. By default, it attempts to generate all applicable self-contained application packages. The source files must be located in a folder called src, and the resulting files (JAR, JNLP, HTML, and self-contained application packages) are put in a folder called dist. This command can only be configured in a minimal way and is as automated as possible.
Signs JAR file(s) with a provided certificate.
Name of the directory that will receive generated output files.
Base directory of the files to package.
List of files in the directory specified by the -srcdir
option. If omitted, all files in the directory (which is a mandatory argument in this case) will be used. Files in the list must be separated by spaces.
Qualified name of the application class to be executed.
An unnamed argument to be inserted into the JNLP file as an <fx:argument>
element.
List of dependent JAR file names.
List of names and values for additional manifest attributes. Syntax:
"name1=value1,name2=value2,name3=value3"
The packager will not convert CSS files to binary form before copying to JAR.
If present, the packager will not add the JavaFX launcher classes to the JAR file.
Name of the directory that will receive generated output files.
Name (without the extension) of the file that will be generated.
A properties file with default named application parameters.
Qualified name of the preloader class to be executed.
Version of the required JavaFX Runtime.
Base directory of the files to package.
List of files in the directory specified by the -srcdir
option. If omitted, all files in the directory (which is a mandatory argument in this case) will be used. Files in the list must be separated by spaces.
If present, the application will require all security permissions in the JNLP file.
Qualified name of the application class to be executed.
An unnamed argument to be inserted into an <fx:argument>
element in the JNLP file.
Specifies user callback methods in generated HTML. The format is the following:
"name1:value1,name2:value2,..."
Description of the application.
If present, the certificates will be embedded in the JNLP file.
If present, the JNLP file will be embedded in the HTML document.
Height of the application.
Properties file with parameters for the resulting application when it is run in the browser.
If present, the srcfiles
are treated as extensions.
Name of the application.
Generate self-contained application bundles (if possible). If type is specified, then only a bundle of this type is created. List of supported types includes: installer
, image
, exe
, msi
, dmg
, rpm
, deb
.
Name of the directory that will receive generated output files.
Name (without the extension) of the file that will be generated.
Properties file with default named application parameters.
Qualified name of the preloader class to be executed.
Base directory of the files to package.
List of files in the directory specified by the -srcdir
option. If omitted, all files in the directory (which is a mandatory argument in this case) will be used. Files in the list must be separated by spaces.
Application ID of the application for template processing.
Name of the HTML template file. Placeholders are in the following form:
#XXXX.YYYY(APPID)#
Where APPID is the identifier of an application and XXX is one of following:
DT.SCRIPT.URL
Location of dtjava.js in the Deployment Toolkit. By default, the location is
http://java.com/js/dtjava.js
DT.SCRIPT.CODE
Script element to include dtjava.js of the Deployment Toolkit.
DT.EMBED.CODE.DYNAMIC
Code to embed the application into a given placeholder. It is expected that the code will be wrapped in the function()
method.
DT.EMBED.CODE.ONLOAD
All the code needed to embed the application into a web page using the onload
hook (except inclusion of dtjava.js).
DT.LAUNCH.CODE
Code needed to launch the application. It is expected that the code will be wrapped in the function()
method.
Name of the HTML file that will be generated from the template.
Title of the application.
Vendor of the application.
Width of the application.
Sets the update mode for the JNLP file.
Qualified name of the application class to be executed.
List of dependent JAR file names.
Height of the application.
Name of the application.
Qualified name of the preloader class to be executed.
Width of the application.
Alias for the key.
Password for recovering the key.
Keystore file name.
Name of the directory that will receive generated output files.
Base directory of the files to be signed.
List of files in the directory specified by the -srcdir
option. If omitted, all files in the directory (which is a mandatory argument in this case) will be used. Files in the list must be separated by spaces.
Password to check integrity of the keystore or unlock the keystore
Keystore type. The default value is "jks".
A -v
option can be used with any task command to enable verbose output.
When the -srcdir
option is allowed in a command, it can be used more than once. If the -srcfiles
option is specified, the files named in the argument will be looked for in the location specified in the preceding srcdir
option. In case there is no -srcdir
preceding -srcfiles
, the directory where the javafxpackager
command is executed will be used.
javafxpackager -createjar -appclass package.ClassName -srcdir classes -outdir out -outfile outjar -v
Packages the contents of the classes
directory to outjar.jar
, sets the application class to package.ClassName
.
javafxpackager -deploy -outdir outdir -outfile outfile -width 34 -height 43 -name AppName -appclass package.ClassName -v -srcdir compiled
Generates outfile.jnlp
and the corresponding outfile.html
files in outdir
for application AppName
, which is started by package.ClassName
and has dimensions of 34 by 43 pixels.
javafxpackager -makeall -appclass brickbreaker.Main -name BrickBreaker -width 600 -height 600
Does all the packaging work including compilation, createjar
, and deploy
.
javafxpackager -signJar --outdir dist -keyStore sampleKeystore.jks -storePass **** -alias javafx -keypass **** -srcdir dist
Signs all of the JAR files in the dist
directory, attaches a certificate with the specified alias, keyStore
and storePass
, and puts the signed JAR files back into the dist
directory.