- Create JAR file that you want to execute it in client side (TestJNLP.jar)
- Sign the file using your certificate
- keytool -genkey -keystore testKeys -alias test
- jarsigner -keystore testKeys TestJnlp.jar test
- Create JNLP file (Test.jnlp)
- Deploy JNLP file and signed JAR file in web server
- Download JNLP file and execute application (http://localhost:8080/Test.jnlp)
Sample JNLP file
<?xml version="1.0" encoding="utf-8"?><jnlp spec="1.0+" codebase="http://localhost:8080/" href="Test.jnlp">
<information>
<title>Jnlp Testing</title>
<vendor>Testing</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="com.test.TestJnlp" />
</jnlp>
For Windows OS, change OS type in resource XML tag as follows.
<resources os="Windows">
For native library access, you have to create DLL into JAR file and then signed the JAR file using certificate and deploy into web server. Then, you have to change JNLP file as follows.
<resources os="Windows">
<j2se version="1.6+" />
<jar href="TestJnlp.jar" />
<nativelib href="DLLtoJAR.jar" />
</resources>
Create DLL into a JAR file using single command
jar cvf DLLtoJAR.jar testDLL.dll
Resource
https://dzone.com/articles/java-web-start-jnlp-hello