Web start and JNLP demo
/*
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+"
codebase="file:///c:/"
href="start.jnlp">
<information>
<title>JNLP Test</title>
<vendor>Java Source and Support, Inc.</vendor>
<homepage href="http://www.java2s.com" />
<description>Demonstration of JNLP</description>
</information>
<resources>
<j2se version="1.2+" />
<jar href="JNLPTest.jar"/>
</resources>
<application-desc main-class="JNLPTest" />
</jnlp>
*/
import java.awt.BorderLayout;
import java.awt.Container;
import javax.swing.JFrame;
import javax.swing.JLabel;
public class JNLPTest {
public static void main(String args[]) {
JFrame frame = new JFrame();
Container content = frame.getContentPane();
JLabel label = new JLabel("Hello, JNLP");
content.add(label, BorderLayout.CENTER);
frame.setSize(200, 200);
frame.show();
try {
Thread.sleep(5000);
} catch (InterruptedException ignored) {
} finally {
System.exit(0);
}
}
}
Related examples in the same category