This tutorial is an update of How to deploy Java Web Start Applications on JBoss tested on JBoss EAP 6 and WildFly.

I have decided to update the older tutorial as a few changes are needed to run Java Web Start applications on newer versions of the application server. First of all, we will create a Web application named DemoWS. Within this application we will place at firstset up the Java Web Start configuration file. This file, placed at the root of the Web application, contains a description of the components and libraries needed to run the Java Web Start application.

Here is sample.jnlp :

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+"
      codebase="http://localhost:8080/DemoWS/" href="/sample.jnlp">
      <title>Sample JWS application</title>
      <vendor>JBoss tutorials</vendor>
      <description>JWS on JBoss Demo</description>
      <homepage href=""/>
      <description kind="short">Example JWS application</description>
       <jar href="/classes.jar"/>   
    <j2se version="1.6+"
   <application-desc main-class="com.sample.MainClass"/>

 The application classes are packaged into the JAR file named "classes.jar" and the Main class, com.sample.MainClass follows here:

package com.sample;

import java.awt.*;
import javax.swing.*;
import javax.jnlp.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class MainClass {
  static BasicService basicService = null;
  static JFrame frame;
  public static void main(String args[]) {
    frame = new JFrame("Hello World Java Web start");
    JLabel label = new JLabel();
    Container content = frame.getContentPane();
    content.add(label, BorderLayout.CENTER);
    String message = "Demo Java Web start";

    try {
      basicService = (BasicService)
    } catch (UnavailableServiceException e) {
      System.err.println("Lookup failed: " + e);

    JButton button = new JButton("Click me");

    ActionListener listener = new ActionListener() {
      public void actionPerformed(ActionEvent actionEvent) {
        try {
        	JOptionPane.showMessageDialog(frame, "Hello from Java Web start");
        } catch (Exception ignored) {


    content.add(button, BorderLayout.SOUTH);

Finally, we need to package the Java Web Start libraries in the WEB-INF/lib folder of your application. These libraries are distributed as part of Java Client Downloads, which are available here.

In order to launch our application, we will include an index.html page that contains a link to the Java Web start application:

<?xml version="1.0" encoding="ISO-8859-1"?>
<head><title>Demo Test of Java Web Start</title></head>
<center><a href="/sample.jnlp">Launch JWS</a></center>

That's all. The expected structure of your Web application follows here:

java web start jboss wildfly

Deploy your application on WildFly / JBoss EAP and test is with http://localhost:8080/DemoWS

Download the DemoWS application used in this example from here.