Documentation Contents
Java Platform, Standard Edition Tools Reference
Contents    Previous    Next

javafxpackager

Performs tasks related to packaging and signing JavaFX applications.

Synopsis

javafxpackager command [options]

command

The task that should be performed.

options

One or more options for the command separated by spaces.

Commands

You can specify one of the following commands. After the command, specify the options for it.

-createbss

Converts CSS files into binary form.

-createjar

Produces a JAR archive according to other parameters.

-deploy

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.

-makeall

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.

-signjar

Signs JAR file(s) with a provided certificate.

Options for the createbss Command

-outdir dir

Name of the directory that will receive generated output files.

-srcdir dir

Base directory of the files to package.

-srcfiles files

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.

Options for the createjar Command

-appclass app-class

Qualified name of the application class to be executed.

-argument arg

An unnamed argument to be inserted into the JNLP file as an <fx:argument> element.

-classpath files

List of dependent JAR file names.

-manifestAttrs manifest-attributes

List of names and values for additional manifest attributes. Syntax:

"name1=value1,name2=value2,name3=value3"
-nocss2bin

The packager will not convert CSS files to binary form before copying to JAR.

-noembedlauncher

If present, the packager will not add the JavaFX launcher classes to the JAR file.

-outdir dir

Name of the directory that will receive generated output files.

-outfile filename

Name (without the extension) of the file that will be generated.

-paramfile file

A properties file with default named application parameters.

-preloader preloader-class

Qualified name of the preloader class to be executed.

-runtimeversion version

Version of the required JavaFX Runtime.

-srcdir dir

Base directory of the files to package.

-srcfiles files

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.

Options for the deploy Command

-allpermissions

If present, the application will require all security permissions in the JNLP file.

-appclass app-class

Qualified name of the application class to be executed.

-argument arg

An unnamed argument to be inserted into an <fx:argument> element in the JNLP file.

-callbacks

Specifies user callback methods in generated HTML. The format is the following:

"name1:value1,name2:value2,..."
-description description

Description of the application.

-embedCertificates

If present, the certificates will be embedded in the JNLP file.

-embedjnlp

If present, the JNLP file will be embedded in the HTML document.

-height height

Height of the application.

-htmlparamfile file

Properties file with parameters for the resulting application when it is run in the browser.

-isExtension

If present, the srcfiles are treated as extensions.

-name name

Name of the application.

-native type

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.

-outdir dir

Name of the directory that will receive generated output files.

-outfile filename

Name (without the extension) of the file that will be generated.

-paramfile file

Properties file with default named application parameters.

-preloader preloader-class

Qualified name of the preloader class to be executed.

-srcdir dir

Base directory of the files to package.

-srcfiles files

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.

-templateId

Application ID of the application for template processing.

-templateInFilename

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.

-templateOutFilename

Name of the HTML file that will be generated from the template.

-title title

Title of the application.

-vendor vendor

Vendor of the application.

-width width

Width of the application.

-updatemode update-mode

Sets the update mode for the JNLP file.

Options for the makeall Command

-appclass app-class

Qualified name of the application class to be executed.

-classpath files

List of dependent JAR file names.

-height height

Height of the application.

-name name

Name of the application.

-preloader preloader-class

Qualified name of the preloader class to be executed.

-width width

Width of the application.

Options for the signjar Command

-alias

Alias for the key.

-keyPass

Password for recovering the key.

-keyStore file

Keystore file name.

-outdir dir

Name of the directory that will receive generated output files.

-srcdir dir

Base directory of the files to be signed.

-srcfiles files

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.

-storePass

Password to check integrity of the keystore or unlock the keystore

-storeType

Keystore type. The default value is "jks".

Notes

Examples

Example 1Using the -createjar Command
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.

Example 2Using the -deploy Command
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.

Example 3Using the -makeall Command
javafxpackager -makeall -appclass brickbreaker.Main -name BrickBreaker -width 600
-height 600

Does all the packaging work including compilation, createjar, and deploy.

Example 4Using the -signjar Command
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.

Contents    Previous    Next

Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us