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”.
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.