Building a Java Web Start Application

While checking out some tutorials of Java on the Oracle website, I discovered that they were using Java Web Start Launcher Applications as demo for the viewers. Basically the applications are JNLP Files  ( Java Network Launch Protocol ). For the applications to work, you do need to have Java installed on your system.

The main advantage in using Java Web Start technology is you can deploy independent software on any system over the network. Most of the demos that are offered by Oracle for Java are JNLP files which are powered by Java Web Start Launcher. The JNLP files are mostly governed by a XML schema which defines all of it’s features.

Java Web Start Application

A few weeks back I shared a Java Application where you can add and remove elements dynamically from a JPanel. For the purpose of the demo of the Java Web Start Application, I have used that particular JAR file. The Java Web Start basically starts a remote Java Application Software on the client machine.

Localhost demo

So, basically we have two files – A JAR file and a JNLP file. The JNLP file acts as the web launcher which runs the JAR application file on the client machine. For a localhost, the following would be the code for a XML file.

Now onto the most important explanation.

  • The ‘codebase’ refers to the directory in which the JNLP file is present.
  • The ‘href’ refers to the name of the JNLP file.
  • The ‘jar href’ refers to the JAR file or the application that will be ran on the client machine.
  • The ‘main-class’ refers to the main Java class that is responsible for the running of the application.

java web start application

Demo

As a demo to see how it works, I have set it up here on Lion Blogger. So, just click on the Launch Button and it should work.

As for the warning part, the application is self signed. If you have your own CA, then you can use it and add it’s resources within the project to suppress the particular message.

Author: Lahaul Seth

A programmer and a web developer, he is the founder of Lion Blogger. His main hobbies are web design & development and providing writing services to clients.

Share This Post On
468 ad

Pin It on Pinterest

Share This
More in Application Development, Featured, Java
Windows Forms Application Login Demo with MySQL Connection in C# .NET

Close