JNLP-enabling an application with NetBeans

NetBeans (version 6.5) makes it very easy to setup an existing Swing application for delivery via Java Web Start:

  1. – In the “Projects” view, right-click on the project to be JNPL-enabled.
  2. – Select Application -> Web Start
  3. – 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.

2 thoughts on “JNLP-enabling an application with NetBeans

  1. Bob

    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

    1. edgblog Post author

      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’


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s