1javafxpackager(1)            Java Deployment Tools           javafxpackager(1)
2
3
4

NAME

6       javafxpackager - Note: This tool has been renamed javapackager. The
7       javafxpackager.exe file may be removed in a future release. Please
8       update your scripts to use javapackager.
9

SYNOPSIS

11           javapackager command [options]
12
13       command
14           The task that should be performed.
15
16       options
17           One or more options for the command separated by spaces.
18

COMMANDS

20       You can specify one of the following commands. After the command,
21       specify the options for it.
22
23       -createbss
24           Converts CSS files into binary form.
25
26       -createjar
27           Produces a JAR archive according to other parameters.
28
29       -deploy
30           Assembles the application package for redistribution. By default,
31           the deploy task generates the base application package, but it can
32           also generate a self-contained application package if requested.
33
34       -makeall
35           Performs compilation, createjar, and deploy steps as one call, with
36           most arguments predefined, and attempts to generate all applicable
37           self-contained application packages. The source files must be
38           located in a folder called src, and the resulting files (JAR, JNLP,
39           HTML, and self-contained application packages) are put in a folder
40           called dist. This command can only be configured in a minimal way
41           and is as automated as possible.
42
43       -signjar
44           Signs JAR file(s) with a provided certificate.
45

OPTIONS FOR THE CREATEBSS COMMAND

47       -outdir dir
48           Name of the directory that will receive generated output files.
49
50       -srcdir dir
51           Base directory of the files to package.
52
53       -srcfiles files
54           List of files in the directory specified by the -srcdir option. If
55           omitted, all files in the directory (which is a mandatory argument
56           in this case) will be used. Files in the list must be separated by
57           spaces.
58

OPTIONS FOR THE CREATEJAR COMMAND

60       -appclass app-class
61           Qualified name of the application class to be executed.
62
63       -argument arg
64           An unnamed argument to be inserted into the JNLP file as an
65           <fx:argument> element.
66
67       -classpath files
68           List of dependent JAR file names.
69
70       -manifestAttrs manifest-attributes
71           List of names and values for additional manifest attributes.
72           Syntax:
73
74               "name1=value1,name2=value2,name3=value3"
75
76
77       -nocss2bin
78           The packager will not convert CSS files to binary form before
79           copying to JAR.
80
81       -outdir dir
82           Name of the directory that will receive generated output files.
83
84       -outfile filename
85           Name (without the extension) of the file that will be generated.
86
87       -paramfile file
88           A properties file with default named application parameters.
89
90       -preloader preloader-class
91           Qualified name of the JavaFX preloader class to be executed. Use
92           this option only for JavaFX applications. Do not use for Java
93           applications, including headless applications.
94
95       -srcdir dir
96           Base directory of the files to package.
97
98       -srcfiles files
99           List of files in the directory specified by the -srcdir option. If
100           omitted, all files in the directory (which is a mandatory argument
101           in this case) will be used. Files in the list must be separated by
102           spaces.
103

OPTIONS FOR THE DEPLOY COMMAND

105       -allpermissions
106           If present, the application will require all security permissions
107           in the JNLP file.
108
109       -appclass app-class
110           Qualified name of the application class to be executed.
111
112       -argument arg
113           An unnamed argument to be inserted into an <fx:argument> element in
114           the JNLP file.
115
116       -Bbundler-argument=value
117           Provides information to the bundler that is used to package a
118           self-contained application. See Arguments for Self-Contained
119           Application Bundlers for information on the arguments for each
120           bundler.
121
122       -callbacks
123           Specifies user callback methods in generated HTML. The format is
124           the following:
125
126               "name1:value1,name2:value2,..."
127
128
129       -description description
130           Description of the application.
131
132       -embedCertificates
133           If present, the certificates will be embedded in the JNLP file.
134
135       -embedjnlp
136           If present, the JNLP file will be embedded in the HTML document.
137
138       -height height
139           Height of the application.
140
141       -htmlparamfile file
142           Properties file with parameters for the resulting application when
143           it is run in the browser.
144
145       -isExtension
146           If present, the srcfiles are treated as extensions.
147
148       -name name
149           Name of the application.
150
151       -native type
152           Generate self-contained application bundles (if possible). Use the
153           -B option to provide arguments to the bundlers being used. If type
154           is specified, then only a bundle of this type is created. If no
155           type is specified, all is used.
156
157           The following values are valid for type:
158
159           ·   all: Runs all of the installers for the platform on which it is
160               running, and creates a disk image for the application. This
161               value is used if type is not specified.
162
163           ·   installer: Runs all of the installers for the platform on which
164               it is running.
165
166           ·   image: Creates a disk image for the application. On OS X, the
167               image is the .app file. On Linux, the image is the directory
168               that gets installed.
169
170           ·   dmg: Generates a DMG file for OS X.
171
172           ·   pkg: Generates a .pkg package for OS X.
173
174           ·   mac.appStore: Generates a package for the Mac App Store.
175
176           ·   rpm: Generates an RPM package for Linux.
177
178           ·   deb: Generates a Debian package for Linux.
179
180       -nosign
181           If present, the bundle generated for self-contained applications is
182           not signed by the bundler. The default for bundlers that support
183           signing is to sign the bundle if signing keys are properly
184           configured. This attribute is ignored by bundlers that do not
185           support signing. At the time of the 8u40 release of the JDK, only
186           OS X bundlers support signing.
187
188       -outdir dir
189           Name of the directory that will receive generated output files.
190
191       -outfile filename
192           Name (without the extension) of the file that will be generated.
193
194       -paramfile file
195           Properties file with default named application parameters.
196
197       -preloader preloader-class
198           Qualified name of the JavaFX preloader class to be executed. Use
199           this option only for JavaFX applications. Do not use for Java
200           applications, including headless applications.
201
202       -srcdir dir
203           Base directory of the files to package.
204
205       -srcfiles files
206           List of files in the directory specified by the -srcdir option. If
207           omitted, all files in the directory (which is a mandatory argument
208           in this case) will be used. Files in the list must be separated by
209           spaces.
210
211       -templateId
212           Application ID of the application for template processing.
213
214       -templateInFilename
215           Name of the HTML template file. Placeholders are in the following
216           form:
217
218               #XXXX.YYYY(APPID)#
219
220           Where APPID is the identifier of an application and XXX is one of
221           following:
222
223           ·   DT.SCRIPT.URL
224
225               Location of dtjava.js in the Deployment Toolkit. By default,
226               the location is
227
228               http://java.com/js/dtjava.js
229
230           ·   DT.SCRIPT.CODE
231
232               Script element to include dtjava.js of the Deployment Toolkit.
233
234           ·   DT.EMBED.CODE.DYNAMIC
235
236               Code to embed the application into a given placeholder. It is
237               expected that the code will be wrapped in the function()
238               method.
239
240           ·   DT.EMBED.CODE.ONLOAD
241
242               All the code needed to embed the application into a web page
243               using the onload hook (except inclusion of dtjava.js).
244
245           ·   DT.LAUNCH.CODE
246
247               Code needed to launch the application. It is expected that the
248               code will be wrapped in the function() method.
249
250       -templateOutFilename
251           Name of the HTML file that will be generated from the template.
252
253       -title title
254           Title of the application.
255
256       -vendor vendor
257           Vendor of the application.
258
259       -width width
260           Width of the application.
261
262       -updatemode update-mode
263           Sets the update mode for the JNLP file.
264

OPTIONS FOR THE MAKEALL COMMAND

266       -appclass app-class
267           Qualified name of the application class to be executed.
268
269       -classpath files
270           List of dependent JAR file names.
271
272       -height height
273           Height of the application.
274
275       -name name
276           Name of the application.
277
278       -preloader preloader-class
279           Qualified name of the JavaFX preloader class to be executed. Use
280           this option only for JavaFX applications. Do not use for Java
281           applications, including headless applications.
282
283       -width width
284           Width of the application.
285

OPTIONS FOR THE SIGNJAR COMMAND

287       -alias
288           Alias for the key.
289
290       -keyPass
291           Password for recovering the key.
292
293       -keyStore file
294           Keystore file name.
295
296       -outdir dir
297           Name of the directory that will receive generated output files.
298
299       -srcdir dir
300           Base directory of the files to be signed.
301
302       -srcfiles files
303           List of files in the directory specified by the -srcdir option. If
304           omitted, all files in the directory (which is a mandatory argument
305           in this case) will be used. Files in the list must be separated by
306           spaces.
307
308       -storePass
309           Password to check integrity of the keystore or unlock the keystore
310
311       -storeType
312           Keystore type. The default value is "jks".
313

ARGUMENTS FOR SELF-CONTAINED APPLICATION BUNDLERS

315       The -B option for the -deploy command is used to specify arguments for
316       the bundler that is used to create self-contained applications. Each
317       type of bundler has its own set of arguments.
318
319   General Bundler Arguments
320       appVersion=version
321           Version of the application package. Some bundlers restrict the
322           format of the version string.
323
324       classPath=path
325           Class path relative to the assembled application directory. The
326           path is typically extracted from the JAR file manifest, and does
327           not need to be set if you are using the other javapackager
328           commands.
329
330       icon=path
331           Location of the default icon to be used for launchers and other
332           assists. For OS X, the format must be .icns. For Linux, the format
333           must be .png.
334
335       identifier=value
336           Default value that is used for other platform-specific values such
337           as mac.CFBundleIdentifier. Reverse DNS order is recommended, for
338           example, com.example.application.my-application.
339
340       jvmOptions=option
341           Option to be passed to the JVM when the application is run. Any
342           option that is valid for the java command can be used. To pass more
343           than one option, use multiple instances of the -B option, as shown
344           in the following example:
345
346               -BjvmOptions=-Xmx128m -BjvmOptions=-Xms128m
347
348
349       jvmProperties=property=value
350           Java System Property to be passed to the VM when the application is
351           run. Any property that is valid for the -D option of the java
352           command can be used. Specify both the property name and the value
353           for the property. To pass more than one property, use multiple
354           instances of the -B option, as shown in the following example:
355
356               -BjvmProperties=apiUserName=example -BjvmProperties=apiKey=abcdef1234567890
357
358
359       mainJar=filename
360           Name of the JAR file that contains the main class for the
361           application. The file name is typically extracted from the JAR file
362           manifest, and does not need to be set if you are using the other
363           javapackager commands.
364
365       preferencesID=node
366           Preferences node to examine to check for JVM options that the user
367           can override. The node specified is passed to the application at
368           run time as the option -Dapp.preferences.id. This argument is used
369           with the userJVMOptions argument.
370
371       runtime=path
372           Location of the JRE or JDK to include in the package bundle.
373           Provide a file path to the root folder of the JDK or JRE. To use
374           the system default JRE, do not provide a path, as shown in the
375           following example:
376
377               -Bruntime=
378
379
380       userJvmOptions=option=value
381           JVM options that users can override. Any option that is valid for
382           the java command can be used. Specify both the option name and the
383           value for the option. To pass more than one option, use multiple
384           instances of the -B option, as shown in the following example:
385
386               -BuserJvmOptions=-Xmx=128m -BuserJvmOptions=-Xms=128m
387
388
389   OS X Application Bundler Arguments
390       mac.category=category
391           Category for the application. The category must be in the list of
392           categories found on the Apple Developer website.
393
394       mac.CFBundleIdentifier=value
395           Value stored in the info plist for CFBundleIdentifier. This value
396           must be globally unique and contain only letters, numbers, dots,
397           and dashes. Reverse DNS order is recommended, for example,
398           com.example.application.my-application.
399
400       mac.CFBundleName=name
401           Name of the application as it appears on the OS X Menu Bar. A name
402           of less than 16 characters is recommended. The default is the name
403           attribute.
404
405       mac.CFBundleVersion=value
406           Version number for the application, used internally. The value must
407           be at least one integer and no more than three integers separated
408           by periods (.) for example, 1.3 or 2.0.1. The value can be
409           different than the value for the appVersion argument. If the
410           appVersion argument is specified with a valid value and the
411           mac.CFBundleVersion argument is not specified, then the appVersion
412           value is used. If neither argument is specified, 100 is used as the
413           version number.
414
415       mac.signing-key-developer-id-app=key
416           Name of the signing key used for Devleloper ID or Gatekeeper
417           signing. If you imported a standard key from the Apple Developer
418           Website, then that key is used by default. If no key can be
419           identified, then the application is not signed.
420
421       mac.bundle-id-signing-prefix=prefix
422           Prefix that is applied to the signed binary when binaries that lack
423           plists or existing signatures are found inside the bundles.
424
425   OS X DMG (Disk Image) Bundler Arguments
426       The OS X DMG installer shows the license file specified by licenseFile,
427       if provided, before allowing the disk image to be mounted.
428
429       licenseFile=path
430           Location of the End User License Agreement (EULA) to be presented
431           or recorded by the bundler. The path is relative to the packaged
432           application resources, for example, -BlicenseFile=COPYING.
433
434       systemWide=boolean
435           Flag that indicates which drag-to-install target to use. Set to
436           true to show the Applications folder. Set to false to show the
437           Desktop folder. The default is true.
438
439       mac.CFBundleVersion=value
440           Version number for the application, used internally. The value must
441           be at least one integer and no more than three integers separated
442           by periods (.) for example, 1.3 or 2.0.1. The value can be
443           different than the value for the appVersion argument. If the
444           appVersion argument is specified with a valid value and the
445           mac.CFBundleVersion argument is not specified, then the appVersion
446           value is used. If neither argument is specified, 100 is used as the
447           version number.
448
449       mac.dmg.simple=boolean
450           Flag that indicates if DMG customization steps that depend on
451           executing AppleScript code are skipped. Set to true to skip the
452           steps. When set to true, the disk window does not have a background
453           image, and the icons are not moved into place. If the systemWide
454           argument is also set to true, then a symbolic link to the root
455           Applications folder is added to the DMG file. If the systemWide
456           argument is set to false, then only the application is added to the
457           DMG file, no link to the desktop is added.
458
459   OS X PKG Bundler Arguments
460       The OS X PKG installer presents a wizard and shows the license file
461       specified by licenseFile as one of the pages in the wizard. The user
462       must accept the terms before installing the application.
463
464       licenseFile=path
465           Location of the End User License Agreement (EULA) to be presented
466           or recorded by the bundler. The path is relative to the packaged
467           application resources, for example, -BlicenseFile=COPYING.
468
469       mac.signing-key-developer-id-installer=key
470           Name of the signing key used for Developer ID or Gatekeeper
471           signing. If you imported a standard key from the Apple Developer
472           Website, then that key is used by default. If no key can be
473           identified, then the application is not signed.
474
475       mac.CFBundleVersion=value
476           Version number for the application, used internally. The value must
477           be at least one integer and no more than three integers separated
478           by periods (.) for example, 1.3 or 2.0.1. The value can be
479           different than the value for the appVersion argument. If the
480           appVersion argument is specified with a valid value and the
481           mac.CFBundleVersion argument is not specified, then the appVersion
482           value is used. If neither argument is specified, 100 is used as the
483           version number.
484
485   Mac App Store Bundler Arguments
486       mac.app-store-entitlements=path
487           Location of the file that contains the entitlements that the
488           application operates under. The file must be in the format
489           specified by Apple. The path to the file can be specified in
490           absolute terms, or relative to the invocation of javapackager. If
491           no entitlements are specified, then the application operates in a
492           sandbox that is stricter than the typical applet sandbox, and
493           access to network sockets and all files is prevented.
494
495       mac.signing-key-app=key
496           Name of the application signing key for the Mac App Store. If you
497           imported a standard key from the Apple Developer Website, then that
498           key is used by default. If no key can be identified, then the
499           application is not signed.
500
501       mac.signing-key-pkg=key
502           Name of the installer signing key for the Mac App Store. If you
503           imported a standard key from the Apple Developer Website, then that
504           key is used by default. If no key can be identified, then the
505           application is not signed.
506
507       mac.CFBundleVersion=value
508           Version number for the application, used internally. The value must
509           be at least one integer and no more than three integers separated
510           by periods (.) for example, 1.3 or 2.0.1. The value can be
511           different than the value for the appVersion argument. If the
512           appVersion argument is specified with a valid value and the
513           mac.CFBundleVersion argument is not specified, then the appVersion
514           value is used. If neither argument is specified, 100 is used as the
515           version number.
516
517   Linux Debian Bundler Arguments
518       The license file specified by licenseFile is not presented to the user
519       in all cases, but the file is included in the application metadata.
520
521       category=category
522           Category for the application. See
523           http://standards.freedesktop.org/menu-spec/latest/apa.html for
524           examples.
525
526       copyright=string
527           Copyright string for the application. This argument is used in the
528           Debian metadata.
529
530       email=address
531           Email address used in the Debian Maintainer field.
532
533       licenseFile=path
534           Location of the End User License Agreement (EULA) to be presented
535           or recorded by the bundler. The path is relative to the packaged
536           application resources, for example, -BlicenseFile=COPYING.
537
538       licenseType=type
539           Short name of the license type, such as -BlicenseType=Proprietary,
540           or "-BlicenseType=GPL v2 + Classpath Exception".
541
542       vendor=value
543           Corporation, organization, or individual providing the application.
544           This argument is used in the Debian Maintainer field.
545
546   Linux RPM Bundler Arguments
547       category=category
548           Category for the application. See
549           http://standards.freedesktop.org/menu-spec/latest/apa.html for
550           examples.
551
552       licenseFile=path
553           Location of the End User License Agreement (EULA) to be presented
554           or recorded by the bundler. The path is relative to the packaged
555           application resources, for example, -BlicenseFile=COPYING.
556
557       licenseType=type
558           Short name of the license type, such as -BlicenseType=Proprietary,
559           or "-BlicenseType=GPL v2 + Classpath Exception".
560
561       vendor=value
562           Corporation, organization, or individual providing the application.
563

DEPRECATED OPTIONS

565       The following options are no longer used by the packaging tool and are
566       ignored if present.
567
568       -runtimeversion version
569           Version of the required JavaFX Runtime. Deprecated.
570
571       -noembedlauncher
572           If present, the packager will not add the JavaFX launcher classes
573           to the JAR file. Deprecated.
574

NOTES

576       ·   A -v option can be used with any task command to enable verbose
577           output.
578
579       ·   When the -srcdir option is allowed in a command, it can be used
580           more than once. If the -srcfiles option is specified, the files
581           named in the argument will be looked for in the location specified
582           in the preceding srcdir option. If there is no -srcdir preceding
583           -srcfiles, the directory from which the javapackager command is
584           executed is used.
585

EXAMPLES

587       Example 1 Using the -createjar Command
588
589               javapackager -createjar -appclass package.ClassName
590                 -srcdir classes -outdir out -outfile outjar -v
591
592           Packages the contents of the classes directory to outjar.jar, sets
593           the application class to package.ClassName.
594
595       Example 2 Using the -deploy Command
596
597               javapackager -deploy -outdir outdir -outfile outfile -width 34 -height 43
598                 -name AppName -appclass package.ClassName -v -srcdir compiled
599
600           Generates outfile.jnlp and the corresponding outfile.html files in
601           outdir for application AppName, which is started by
602           package.ClassName and has dimensions of 34 by 43 pixels.
603
604       Example 3 Using the -makeall Command
605
606               javapackager -makeall -appclass brickbreaker.Main -name BrickBreaker -width 600
607               -height 600
608
609           Does all the packaging work including compilation, createjar, and
610           deploy.
611
612       Example 4 Using the -signjar Command
613
614               javapackager -signJar --outdir dist -keyStore sampleKeystore.jks -storePass ****
615               -alias duke -keypass **** -srcdir dist
616
617           Signs all of the JAR files in the dist directory, attaches a
618           certificate with the specified alias, keyStore and storePass, and
619           puts the signed JAR files back into the dist directory.
620
621       Example 5 Using the -deploy Command with Bundler Arguments
622
623               javapackager -deploy -native deb -Bcategory=Education -BjvmOptions=-Xmx128m
624
625                   -BjvmOptions=-Xms128m -outdir packages -outfile BrickBreaker -srcdir dist
626                   -srcfiles BrickBreaker.jar -appclass brickbreaker.Main -name BrickBreaker
627                   -title "BrickBreaker demo"
628
629           Generates the native Linux Debian package for running the
630           BrickBreaker application as a self- contained application.
631
632
633
634JDK 8                            03 March 2015               javafxpackager(1)
Impressum