Java Reference
In-Depth Information
The previous screenshot shows the Web Start-launched application
running. Notice, however, that since the application is not signed (with
a vendor certificate), it carries an advisory label located at the upper
right-hand side corner of the window. Future versions of the SDK may
remove this label to provide a less alarmist user experience.
How it works...
We will not discuss the JavaFX code itself here. It is simple and is designed to be used
as an illustrative tool to show you how to build and package your code as Java Web Start
using the javafxpackager tool. As we have seen in the recipe Packaging your app using
javafxpackager , we use the packager's command-line interface to specify several parameters
that were covered in the previous recipe about javafxpackager. However, the following
parameters are worth mentioning:
F -appVendor —is a descriptive name for the application's vendor that gets displayed
on the default Java Web Start splash screen.
F -appVersion —is the application's version. Web Start uses this number for
incremental future updates.
The packager tool generates all necessary artifacts required for successful deployment. Upon
close examination of the JNLP file, we see that the command-line arguments values appear
in the JNLP file as parameters. In addition, the generated JNLP file include the following
configuration parameters that will effect how the application is installed and launched:
F Offline option —specifying tag <offline-allowed/> will cause the application to
be cached locally, with the ability to be launched by the Web Start manager, without
requiring subsequent application download with future uses.
F Shortcut integration —by default, the packager tools turn on desktop integration
through the <shortcut><desktop/><desktop/> tags. This will cause Web
Start to create a shortcut icon on the client's desktop.
F JavaFX class launcher —the <application-desc/> tag specifies a
Sun-provided class launcher, which loads the JavaFX main class. In our
example, the launcher will launch our application using the main class
specified by argument MainJavaFXScript=webstart.demo.Main .
There's more...
The Java Web Start technology has been part of the Java landscape for quite a while. Recently,
however, it has become one of the main characters in the JavaFX story. Web Start makes it
easy to deploy your desktop application by providing a uniform mechanism for deploying and
installing applications on the user's local machine. Some of the more prominent features of
Java Web Start include:
 
Search WWH ::




Custom Search