Saturday, October 31, 2009

NetBeans Platform: JNLP & static codebase

Recently the question was asked on the dev@openide.netbeans.org 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 sourceforge.net.

Here are the build.xml and platform.properties I used:
The Ant script will create the file "${nbdist.dir}/${app.name}-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:
http://puces-samples.svn.sourceforge.net/viewvc/puces-samples/tags/sessionstate-1.0/

You can run this sample here:
http://puces-samples.sourceforge.net/
or here:
http://puces-blog.blogspot.com/2009/04/netbeans-platform-meets-swing.html
(at the bottom of the page)