An IDE makes it easy to build and package your JavaFX application; however, driving the build process from a command-line interface may be the desirable approach (automated build comes to mind). In this recipe, we will see how to use the javafxpackager command-line tool to package and get your desktop application ready for deployment.
You should be familiar with using the command shell. We will assume that you have properly installed the JavaFX SDK with the JAVAFX_HOME/bin
added to your shell's executable path. If you do not have the JavaFX SDK installed properly, you will not be able to run the javafxpackager tool. To ensure that you have your environment set up as expected, from a command prompt type javafxpackager - version
, as shown next:
$> javafxpackager - version $> javafxpackager 1.2.0_b233
You should get the version of the launcher currently installed (similar to the previous listing). If you get an error...