Specifying icon and splash images for Java Web Start launches of app clients
By tjquinn on Mar 14, 2007
This has been a recurring enhancement request for the GlassFish feature for launching app clients using Java Web Start: let the developer have control over the JNLP document that's generated.
We hope to provide a general solution to this that lets developers specify almost any JNLP content. Until then, though, we have taken a small step in that direction, responding to some specific requests by allowing the developer to choose files in the app client that Java Web Start will use for the icon and splash images.
Ever since the Java Web Start launch feature first appeared, developers could specify the text used in the "vendor" display on the Java Web Start screen during launch by adding something like this to the sun-application-client.xml descriptor for the app client:
As an interim solution until we provide a more general JNLP customization approach, you can use the <vendor> element to point to the icon image, the splash screen image, both, or neither, as well as the vendor text.
The general format for the vendor text is now this:
The separator is a double-colon. The URIs are the relative paths, within the app client module, to the image files. If only one image is specified it will be used at the icon image, not the splash image.
GlassFish will specify that Java Web Start use icon.jpg in the images/ directory for the icon image and splash.jpg in the otherDir directory for the splash screen.myImage.jpg::MyCorp, Inc.
The file myImage.jpg at the top-level of the app client module will be the icon image, and Java Web Start will provide its default splash screen image.::images/splash.jpg::MyCorp, Inc.
Java Web Start will use its default image for the icon and will use images/splash.jpg as the splash screen image.MyCorp, Inc.
<<>>Java Web Start will use the default icon and splash screen images.