JNLP (Java Network Launching Protocol) for installing the JVM (Java Virtual Machine) and Java apps. Sun has written a specific implementation of it called Java Web Start.
The Java Web Start entry will explain how to set up the *.jnlp to javaws.exe association in your browser and desktop.
|JNLP Versions||JNLP Validation|
|Sample JNLP 1.5||The XSD Schemas|
|Sample JNLP 1.6||The Validator Program|
|Icons||DTD for JNLP|
|Multiple JNLP Files||Learning More|
New in version 1.5, Java version 1.5 or later:
Here is an example using the most recent JNLP 1.6 specification.Note the use of <java instead of <j2se and <update check=always policy=always />.
The ordering of the sections matters. You must do them in the order jnlp, information, security, update, resources, application-desc, applet-desc, component-desc, installer-desc.
Within the resources sections, order is again important: java, j2se, jar, nativelib, extension, property, package.
You nest <java inside <resources. However, you can nest another <resources inside the <java to describe the resources to use for that JVM only.
Every time Sun releases a new JRE (Java Runtime Environment), you need to add it to all your JNLP files if you want your clients to be able to access your web start apps with it.
<!-- chaining off an auxiliary jnlp file from the main one --> <extension name="Installer" href="esperinstaller.jnlp"/>
You can check that your JNLP file is correctly formed using an XSD (XML Scheme Definition) Schema originally from Vampqh. You must copy the JNLP 1.0 XSD schema posted below into the current directory as file jnlp1.xsd or jnlp6.xsd then run the Java validation posted below with:
rem Validate a JNLP file with CMP ValidateJNLP utility java.exe ValidateJNLP jnlp6.xsd C:\mydir\myapp.jnlp
This is an XSD schema to validate JNLP 1.0 :
This is an XSD schema to validate JNLP 1.5. It was mechanically generated by Stylus Studio from the Sun JNLP DTD (Document Type Definition). I modified it slightly to allow both :This JNLP 1.6 schema was mechanically generated by Stylus Studio from the Sun JNLP DTD. I modified it slightly to correct two syntax errors in the DTD and to allow both an application and installer.
The above validator is not user friendly. You can get a good idea what it is looking for by reading the XSD file. You would be surprised how many errors you will find.
Unfortunately, Vampqh’s fancier validator, Vanessa, is no longer available.
<!ELEMENT update> should be: <!ELEMENT update EMPTY> and <!ELEMENT shortcut (desktop? menu?)> should be: <!ELEMENT shortcut (desktop?, menu?)>
You don’t need to concern yourself with DTDs when composing or using *.jnlp files, just in validating them to make sure they contain no syntax errors. The DTD file contains a formal description of the JNLP syntax. JNLP files no not need a DOCTYPE tag at the top pointing to the URL (Uniform Resource Locator) where you can download the DTD at http://java.sun.com/dtd/JNLP-6.0.dtd still hosted only at Sun.
One way to learn JNLP tricks is to snoop on the JNLP files of other people’s applications.
rem jnlpview.bat viewing a JNLP file. javaws.exe -viewer rem then right click on the installed JWS app and click show JNLP file.
available on the web at:
optional Replicator mirror
Please email your feedback for publication, letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : . If you want your message, your name or email kept confidential, not considered for public posting, please explicitly specify that. Unless you state otherwise, I will treat your message as a letter to the editor that I may or may not publish in the feedback section. After that, it will be too late to retract it. If you disagree with something I said, especially when sending an ad-hominem attack, a rant composed mainly of obscenities or a death threat, please quote the offending passage and cite the web page where you found it, tell me why you think it is wrong, and, if possible, provide some supporting evidence. I can’t very well fix erroneous or ambiguous text if I can’t find it.
Your face IP:[18.104.22.168]
|Feedback||You are visitor number 59,649.|