Java Web Start (Jnlp) Tutorial | Code Factory

Reference Link : Link

Donate : PayPal

Here is a brief explanation about Java Web Start from SUN

package com.codeFactory;import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.jnlp.BasicService;
import javax.jnlp.ServiceManager;
import javax.jnlp.UnavailableServiceException;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
public class Test {
static BasicService basicService = null;
public static void main(String args[]) {
JFrame frame = new JFrame("Code Factory");
JLabel label = new JLabel();
Container content = frame.getContentPane();
content.add(label, BorderLayout.CENTER);
String message = "Jnlp Hello Word";
label.setText(message);try {
basicService = (BasicService) ServiceManager.lookup("javax.jnlp.BasicService");
} catch (UnavailableServiceException e) {
System.err.println("Lookup failed: " + e);
JButton button = new JButton("");ActionListener listener = new ActionListener() {
public void actionPerformed(ActionEvent actionEvent) {
try {
URL url = new URL(actionEvent.getActionCommand());
} catch (MalformedURLException ignored) {
button.addActionListener(listener);content.add(button, BorderLayout.SOUTH);
keytool -genkey -keystore testKeys -alias jdc
jarsigner -keystore testKeys TestJnlp.jar jdc
<?xml version="1.0" encoding="utf-8"?> 
<jnlp spec="1.0+" codebase="http://localhost:8080/" href="Test.jnlp">
<title>Jnlp Testing</title>
<vendor>YONG MOOK KIM</vendor>
<homepage href="http://localhost:8080/" />
<description>Testing Testing</description>
<j2se version="1.6+" />
<jar href="TestJnlp.jar" />
<application-desc main-class="com.codeFactory.Test" />



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store