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)

6 comments:

  1. THANK YOU!! After a day of trying to find a solution (and not beeing an Ant-expert myself) your files above saved my day!

    ReplyDelete
  2. This is my first time i visit here. I discovered so numerous interesting stuff in your weblog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all of the enjoyment here! maintain up the great work.

    ReplyDelete
  3. Thanks for sharing your post and it was superb .I would like to hear more from you in future too.

    ReplyDelete
  4. I gave up long ago to find a solution on this. Thanks for clearing it up. Finally

    ReplyDelete
  5. gr8 stuff and thanks for sharing ur knowledge
    http://soft-engineering.blospot.com

    ReplyDelete
  6. This is a good posting, I was wondering if I could use this write-up on my website, I will link it back to your website though. If this is a problem please let me know and I will take it down right away

    ReplyDelete