javafxpackager(1)

NAME
javafxpackager - A tool with commands that perform tasks related to packaging and signing JavaFX applications.

SYNOPSIS

    javafxpackager -taskcommand [-options]

where -taskcommand is one of the following:

-createjar
    Produces a JAR archive according to other parameters.

-deploy
    Generates the JNLP and HTML files according to other parameters.

-createbss
    Converts CSS files into binary form.

-signJar
    Signs JAR file(s) with a provided certificate.

-makeall
    Performs compilation, createjar, and deploy steps as one call, with most arguments predefined. The source files must be located in a folder called src, and the resulting files (JAR, JNLP, HTML) are put in a folder called dist. This command can only be configured in a minimal way and is as automated as possible.

OPTIONS FOR THE CREATEJAR COMMAND

-appclass <application class>
    Qualified name of the application class to be executed.

-preloader <preloader class>
    Qualified name of the preloader class to be executed.

-paramfile <file>
    A properties file with default named application parameters.

-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 additional manifest attributes. Syntax:

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

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

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

-runtimeversion <version>
    Version of the required JavaFX Runtime.

-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.

-srcdir <dir>
    Base directory of the files to package.

-srcfiles <files>
    List of files in srcdir. If omitted, all files in srcdir (which is a mandatory argument in this case) will be used.

OPTIONS FOR THE DEPLOY COMMAND

-title <title>
    Title of the application.

-vendor <vendor>
    Vendor of the application.

-description <description>
    Description of the application.

-appclass <application class>
    Qualified name of the application class to be executed.

-preloader <preloader class>
    Qualified name of the preloader class to be executed.

-paramfile <file>
    Properties file with default named application parameters.

-htmlparamfile <file>
    Properties file with parameters for the resulting application when it is run in the browser .

-width <width>
    Width of the application.

-height <height>
    Height of the application.

-native <name>
    Generate platform-specific native bundles (if possible).

-name <name>
    Name of the application.

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

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

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

-updatemode <updatemode>
    Sets the update mode for the JNLP file.

-isExtension
    If present, the srcfiles are treated as extensions.

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

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

-templateInFilename
    Name of the HTML template file. Placeholders are in the following form:

        #XXXX.YYYY(APPID)#

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

-templateId
    Application ID of the application for template processing.

-argument arg
    An unnamed argument to be inserted into an <fx:argument> element in the JNLP 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.

-srcdir <dir>
    Base directory of the files to package.

-srcfiles <files>
    List of files in srcdir. If omitted, all files in srcdir (which is a mandatory argument in this case) will be used.

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 srcdir. If omitted, all files in srcdir (which is a mandatory argument in this case) will be used.

OPTIONS FOR THE SIGNJAR COMMAND

-keyStore <file>
    Keystore file name.

-alias
    Alias for the key.

-storePass
    Password to check integrity of the keystore or unlock the keystore

-keyPass
    Password for recovering the key.

-storeType
    Keystore type. The default value is "jks".

-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 srcdir. If omitted, all files in srcdir (which is a mandatory argument in this case) will be used.

OPTIONS FOR THE MAKEALL COMMAND

-appclass <application class>
    Qualified name of the application class to be executed.

-preloader <preloader class>
    Qualified name of the preloader class to be executed.

-classpath <files>
    List of dependent JAR file names.

-name <name>
    Name of the application.

-width <width>
    Width of the application.

-height <height>
    Height of the application.

NOTES

    • 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.

EXAMPLES

Example 1, -createjar Command Usage

        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 2, -deploy Command Usage

        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 x 43.

Example 3, -makeall command Usage

        javafxpackager -makeall -appclass brickbreaker.Main -name BrickBreaker
          -width 600 -height 600
    Does all the packaging work including compilation: compile, createjar, deploy.

Example 4, -signJar Command Usage

        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.