GlassFish V2 and out-of-the-box Java Web Start support for App Clients

Today GlassFish V2 is officially released (corresponding to Sun's app server product Sun Java System Application Server 9.1)!  This release represents a lot of work by a lot of people, including many users in the community who have been downloading builds along the way and reporting their experiences.

Judging from postings by new users in the GlassFish forum there has been steady growth in the use of the built-in, out-of-the-box support for launching app clients using Java Web Start since that feature first appeared in GlassFish V1.  This latest GlassFish V2 release contains a minor enhancement which I have written about before but will summarize briefly here.

You can now specify the splash image and the icon image you want to use for your app client when your users launch it using Java Web Start.  Since the original implementation of this feature, you could always use the <java-web-start-support><vendor> element in the sun-application-client.xml file to specify the text to be displayed in the splash screen that Java Web Start automatically supplies.  Now in GlassFish V2 you can also use this element to specify the splash screen and/or the icon image. 

Specify the vendor text as


where the two URIs indicate where within the app client archive the image files are located.  If you specify only one image, that URI is used for the icon image and Java Web Start will display its default splash screen using the vendor-text you supply. 

By the way, we plan to allow developers much broader ability to customize the generated JNLP in GlassFish V3.  Until then this enhancement allows you to tailor your end-users' experience with your application.


[Trackback] GlassFish v2 is officially out today and the blogosphere will be flooded by marketing pitches and blogs from my co-workers about its Java EE features like EJBs, Toplink, JSF, etc...which are cool, but not extremely cool :-)! So, what's really cool with...

Posted by Jean-Francois Arcand's Blog on September 17, 2007 at 06:08 AM CDT #

JWS is great feature to glassfish, but we hope glassfish can improve the performance.
Thanks ,Tim!

Posted by Roland on September 18, 2007 at 01:15 AM CDT #

I hope we can, also. Reducing the size of the footprint needed on the client side is a real goal for V3. That will have a significant effect on the download time for the first app client launch using Java Web Start.

Posted by Tim Quinn on September 18, 2007 at 03:14 AM CDT #

Hi Tim: i found run ACC under Linux is faster than Windows . I have tested it ,same machine

Linux : about 10s
Windows : about 100s

What's the difference between Linux and Windows for Glassfish ?

Thanks !

Posted by Roland on September 25, 2007 at 01:16 PM CDT #

The general impression is that file I/O on Windows tends to be slower than on other platforms. The ACC must expand the generated app client JAR file, and it does so into the temporary directory. If that JAR is large or if the temp directory on Windows is relatively full the time difference could be even more noticeable.

Posted by Tim Quinn on September 25, 2007 at 01:36 PM CDT #

Hi Tim,

Great to read that support for JWS is being increased in Glassfish! It really is a nice feature. One question though; how about the support to load native libs via Web Start? Is this already taken care of, or in the pipeline?


Posted by Vaak on October 05, 2007 at 01:58 AM CDT #

We are planning much more general customization of the generated JNLP for GlassFish V3. Specifying virtually any JNLP content - including native libs - would be part of that.

Posted by Tim Quinn on October 05, 2007 at 04:16 AM CDT #

Hi Tim,
I'm a newbie to WebStart with NB6 beta 2 and GlassFish. Is there a simple tutorial somewhere to answer my first level questions?

Somehow I got the impression that in order to use WebStart in GF I must package my application inside an Enterprise Application (is that true or false?).

In NB6, it seems that I can only package Enterprise Application Clients inside an Enterprise Application, so I have done that.

After a small hiccup which was solved by changing the IP address from in GF / config / ORB / IIOP / orb-listener-1 to physical IP for the server, I can now get the application to Web Start ;-)

However, the application uses WebServices and I now have an issue with JAXB versions:

Exception in thread "AWT-EventQueue-2" java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/C:/Documents%20and%20Settings/pjl/Application%20Data/Sun/Java/Deployment/cache/6.0/42/1eb32daa-4860bf59!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See

I have tried to setup the endorsed-dir for the Application Client, and have added the JAXB 2.1 libraries to the Enterprise APplication, but the endosed dir settings don't seem to get through to the startup which is used for Web Start. Any ideas how I should solve that one please?

Posted by Jonathan Lister on November 05, 2007 at 09:36 PM CST #

Hi, Jonathan. I'm glad to see of your interest in this feature.

First, there is no official tutorial that deals well with the Java Web Start feature, unfortunately. The GlassFish documentation Developer's Guide at discusses the key aspects (look in the Developing Java Clients section), as do other entries in this blog, and some entries in the GlassFish forum at are on the topic of Java Web Start support.

Now, as to the problem you mentioned. It looks it is like the same issue someone posted a forum entry about just yesterday here: Please read my response there for more information.

You are using Java SE 6 on the client, right? If you use Java SE 5 instead, I suspect it will work. Of course I realize that this may not be a workable solution for you and I have a better solution in mind that I have not been able to test yet. I will probably be creating a new GlassFish issue for tracking this and I will post a link to it in the forum topic I mentioned above.

I'm sorry that this is not working as expected. Please stay tuned.

Posted by Tim Quinn on November 05, 2007 at 10:16 PM CST #

[Trackback] GlassFish v2.1 is out today, and as for v2.0, here is a list of cool features the official documentation is not talking about: Comet, Cometd, Apache, JavaFX, etc...

Posted by Jean-Francois Arcand's Blog on December 19, 2007 at 09:44 AM CST #

The tool is really very nice I need to learn a lot just have started with it.

Posted by Max on May 05, 2008 at 09:01 PM CDT #

I'm glad you have found this useful so far. As you will find out, in GlassFish v2 we have to download several JAR files to run the client on the end-user's system, and some of them are quite large. We have plans for greatly improving this in v3, but at least in v2 Java Web Start's caching makes the second, third, etc. runs of a client much faster than the first.

Please continue to let us know of your experience with this feature!

Posted by Tim Quinn on May 05, 2008 at 11:37 PM CDT #

Java Web Server integration in GF is truly a blessing.

Alas, I have encountered an issue.

I use the Sun Application Server flavor of Glassfish V2 U2 running on Windows XP. There is a deployment issue in the default domain (I have not tested this on another domain), if you change the asenv.bat setting for derby from the one defined by the application server in <appserverinstalldir>/javadb to another one. The error appears to arise in main-ext.jnlp.
The relative code is:

<j2se version="1.5+"/>
<jar href="hxxp://localhost:8080/__JWSappclients/__appserver/aslib/derbyclient.jar" />

I would guess that somewhere there is some sort of hard-coded reference to derbyclient.jar in the default app server derby directory.

The application client runs fine on 2 machines accessing the server, by reseting the derby directory setting to the default directory.

Posted by mfg8876 on May 07, 2008 at 11:17 PM CDT #

Thanks for the kind words about the feature. It's always good to hear that it's meeting a need for people.

As for the problem you faced, could you please open an issue using this URL

(You will have to log in but after that it should redirect to the issue entry page. Make sure that the subcomponent is standalone_client.)

Very important - please attach your original asenv.bat, the revised asenv.bat after you edited it, and the error messages/stack trace you get.

The logic on the server side that handles Java Web Start support is indeed written to use the environment variable (well, to be precise, a system property that is set from the environment variable) so we need to find out exactly what is going on. The attachments I've asked you to provide will help with that.

- Tim

Posted by Tim Quinn on May 08, 2008 at 05:48 AM CDT #

I know this is a late comment, but hopefully you will get it. I am trying to get some converstations started about the jax-ws/java web start/app client from glassfish problem. After upgrading to 3.1 everything broke for us again and I can't find the right place to post and get a response.

Have you had any luck figuring out the issues with it?

Posted by Geoff on March 09, 2011 at 04:32 AM CST #

Post a Comment:
  • HTML Syntax: NOT allowed

News and musings on the technology I work on at Oracle.

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.


« July 2016