Saturday, October 31, 2009

NetBeans Platform: JNLP & static codebase

Recently the question was asked on the mailing list, how to deploy a JNLP NetBeans Platform application to a web server, which doesn't support WAR-files.
I had the same problem when I wanted to deploy the sample application of my last NetBeans Platform post (NetBeans Platform meets Swing Application Framework: SessionStorage), which is a JNLP NetBeans Platform application, too, that I host along with its source at

Here are the build.xml and I used:
The Ant script will create the file "${nbdist.dir}/${}-updated.war". Just copy it to your web server and unzip it there. Then link to the master.jnlp to provide a starting-point to your application, eg. by creating a web start launch button.

Here is the complete code:

You can run this sample here:
or here:
(at the bottom of the page)