And another thing...
Tim Quinn's Blog

Thursday Feb 02, 2006

Every app client you deploy using the GlassFish project automatically benefits from Java Web Start support, but you may want to change some of the default behavior.

If you have deployed an app client and then launched it using Java Web Start technology, you may have noticed a splash screen something like this (this one is from a very simple test that displays the values of command-line arguments):


(Sorry if you see empty space above - it's an artifact of the page display. You're not missing anything!)

Java Web Start refers to the first line (“Application Client showArgs-client) as the title of the Java Web Start application and the second line (“Application Client”) as the vendor. For GlassFish app clients launched via the Java Web Start feature, the default title includes the file name of the module that contains the app client. If the app client is contained inside an EAR, then the title is from the name of the app client's submodule within the EAR. The vendor defaults to the value “Application Client.” While these values are accurate, they probably do not help your end-users understand what they are running.

The Java EE standard deployment descriptor for app clients allows you to set a display name for the app client. The GlassFish Java Web Start support uses the app client display name – if you specify one – as the Java Web Start title.

<?xml version="1.0" encoding="UTF-8"?>

<application-client xmlns='http://java.sun.com/xml/ns/javaee'
  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
  xsi:schemaLocation='http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd'
  version="5"> 
  
  <display-name>Show Arguments</display-name>

</application-client>

You can change the vendor by setting a value in the sun-application-client.xml deployment descriptor in the app client module.

<?xml version="1.0" encoding="UTF-8"?>

<sun-application-client>
    <java-web-start-access>
        <vendor>Sun Microsystems, Inc.</vendor>
    </java-web-start-access>
</sun-application-client>

With these changes, the splash screen becomes this:



Probably more what you – and your users – have in mind.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed