Hi guys.......
I have a problem regarding to JNLP.

I have a simple java program TestJnlp.java and its corresponding class file.

D:\jnlp\TestJnlp.java
D:\jnlp\TestJnlp.class

And a jar file, containing thsese files.
D:\jnlp\TestJnlp.jar

Now I have created a jnlp file Test.jnlp.



//TestJnlp.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/



/**
*
* @author MS
*/

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


public class TestJnlp {

static BasicService basicService = null;
public static void main(String args[]) {
JFrame frame = new JFrame("Mkyong Jnlp UnOfficial Guide");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOS E);
JLabel label = new JLabel();
Container content = frame.getContentPane();
content.add(label, BorderLayout.CENTER);
String message = "Jnln Hello Word";

label.setText(message);

try {
basicService = (BasicService)ServiceManager.lookup("javax.jnlp.Ba sicService");
} catch (UnavailableServiceException e) {
System.err.println("Lookup failed: " + e);
}

JButton button = new JButton("http://www.mkyong.com");

ActionListener listener = new ActionListener() {
public void actionPerformed(ActionEvent actionEvent) {
try {
URL url = new URL(actionEvent.getActionCommand());
basicService.showDocument(url);
} catch (MalformedURLException ignored) {
}
}
};

button.addActionListener(listener);

content.add(button, BorderLayout.SOUTH);
frame.pack();
frame.show();
}
}


//Test.jnlp

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8080/" href="Test.jnlp">
<information>
<title>Jnlp Testing</title>
<vendor>YONG MOOK KIM</vendor>
<homepage href="http://localhost:8080/" />
<description>Testing Testing</description>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.6+" />
<jar href="TestJnlp.jar" />
</resources>
<application-desc main-class="TestJnlp" />
</jnlp>



Now these two TestJnlp.jar and Test.jnlp files I have copied in the root directory of apache.
Path ----

C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\ROOT


At last when I try to run this jnlp file through browser http://localhost:8080/Test.jnlp, an window is appear and shows----

Application error

Unable to launch the application
Name: ............
Publisher:...........
From: http://localhost:8080


I can't understand what is the problem?
Someone help me.
Thank you.