Friday, March 9, 2012

Starting a Web Start application locally

Java Web Start is a technology that allows you to load your application from a http server. This has some advantages: the user doesn't have to install your application, you're sure that your users are always using the latest version of your application etc.. You can find more information on this technology at

To create a webstart application you need to create a JNLP descriptor. See for the syntax.
The codebase specifies the location where java can find your files (all resources in the jnlp file are relative to this path). When you deploy your Web Start application, this will be the location on the http server where you upload your application (eg:

When you're developing or testing your application, you don't want to upload it every time you make a change. Unfortunately, you can't leave the codebase blank. Leaving it blank will give you the following exception:
The field <jnlp>href has and invalid value:

So what should you put there? You can't put the path to your application (eg: c:/myapp), since that will leave you with the same error message.
Your next try might be file:///c:/myapp or file:/c:/myapp, which won't work either. The correct syntax is:

Now you can test your Web Start application locally!

1 comment:

  1. I think this is one of the best information about java WebStart that I read and this is not only my opinion,even OKL company comfirmed it.