Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

Java tip: Deploying JavaFX apps to multiple environments

Get around the 'gotchas' of JavaFX deployment

  • Print
  • Feedback

Page 3 of 3

jarsigner -keystore jpadfx.ks out\jpadfx.jar jpadfx

Double-click JPadFX.jnlp from a file manager program to run JPadFX via Java Web Start. Similarly, double-click JPadFX.html to load this HTML file in a browser and run the application in that context (see Figure 1). In either scenario, you must grant permission to give the application unrestricted access.

Figure 1. A screenshot of the JPadFX app embedded in a Mozilla Firefox web browser (click to enlarge)

In conclusion

You can compile and deploy JPadFX under JavaFX 2.0.2, JavaFX 2.0.3, and JavaFX 2.1. For each version, javafxpackager makes it easy to deploy this JavaFX app to multiple environments. JavaFX 2.0.2's version of this tool is somewhat problematic, resulting in your having to explicitly use jarsigner to sign jpadfx.jar with a test certificate.

For each of versions 2.0.2, 2.0.3, or 2.1, JPadFX exhibits a serious problem when run on a 64-bit Windows platform. Selecting Open, Save, or Save As from the File menu results in the following error messages:

Error: 80070057 in SHCreateItemFromParsingName((PCWSTR)
folder, NULL,
                                               IID_IShellItem,
                                               (void **) &pItem)
COM Error: 80070057 The parameter is incorrect.
Error: 80004005 in pOpenDialog->GetResults(&pFiles)
COM Error: 80004005 Unspecified error
java.lang.NullPointerException

As pointed out by a poster in the Oracle Discussion Forums, these messages appear to be related to a low-level Microsoft COM error in a native library accessed by the javafx.stage.DirectoryChooser and javafx.stage.FileChooser Windows implementations.

About the author

Jeff Friesen is a freelance tutor and software developer with an emphasis on Java and Android. In addition to writing Java and Android books for Apress, Jeff has written numerous articles on Java and other technologies for JavaWorld, informIT, Java.net, and DevSource. Jeff can be contacted via his website at TutorTutor.ca.

Read more about Enterprise Java in JavaWorld's Enterprise Java section.

  • Print
  • Feedback

Resources

More from JavaWorld

  • Find more of Jeff's writing in Java Tutor, his blog on JavaWorld.
  • See the JavaWorld Site Map for a complete listing of research centers focused on client-side, enterprise, and core Java development tools and topics.