NetBeans (version 6.5) makes it very easy to setup an existing Swing application for delivery via Java Web Start:
- - In the “Projects” view, right-click on the project to be JNPL-enabled.
- - Select Application -> Web Start
- - Tick ‘Enable Web Start’ and ‘Self-signed’
That’s it. A clean build will now produce a .jnlp file in the project’s dist directory, and if all goes well the next run will now invoke the Web Start mechanism.
With this configuration NetBeans will use a different certificate for each project when signing the associated jars. Which is fine.. until there’s a need to reuse a common set of jars from two different projects. This will cause Web Start to fail because: “JAR resources in JNLP file are not signed by same certificate”.
One possible solution is to use the extensions mechanism built into JNLP. See here and there for more details.
The other is to create your own certificate and use it to sign all jars.
- Install the NetBeans keystore plugin, part of the mobility pack module (Tools->Plugins-> pick the mobility module and restart NB).
- Activate the keystores manager (Tools-> Keystores)
- Add a new keystore:

- Create a new key Pair alias for that keystore:

-Finally, dont forget to setup your project to use the new keystore.
Everything was perfectly clear until I got to item 1: right-clicking on the project did not show a JNPL-enabled menu item; at least, not in NetBeans 6.7.1 or 6.8
Comment by Bob — January 11, 2010 @ 7:30 am |
The procedure described above applies to Netbeans 6.5 (as stated in the post)…
With Netbeans 6.8 you simply need to create a Module Suite, configure it as a standalone application,
then right-click on the project name and pick ‘Build JNLP application’
Comment by edgblog — January 11, 2010 @ 6:53 pm |