Java Network Launch Protocol (JNLP) - Yash-777/SeleniumDriverAutomation GitHub Wiki

JNLP Elements Image
  • The jnlp element is the root element. It has a set of attributes that are used to specify information that is specific to the JNLP file itself.
  • The information element describes meta-information about the application. That information can, for example, be shown to the user during download. This is explained later in this section.
  • The security element is used to request a trusted application environment. This is described in detail in section 5.3.
  • The resources element specifies all the resources that are part of the application, such as Java class files, native libraries, and system properties. Section 4 describes this in detail. T * he final part of a JNLP file is one of the following four elements: application-desc, applet-desc, component-desc, and installer-desc. Only one of the four can be specified in each JNLP file. A JNLP file with either an application-desc or applet-desc is called an application descriptor, whereas a JNLP file with an component-desc or an installer-desc element is called an extension descriptor. These elements are described later in this section. The following JNLP file fragment shows the outline with the actual syntax for a JNLP file:
<1-- <html><body>Redirecting to already running application...</body></html> -->
<?xml version="1.0" encoding="ISO-8859-1"?>
<jnlp spec="1.0+" codebase="https://download.oracle.com/otndocs/jcp/jnlp-6.0.10-mrel2-full-oth-JSpec/" xmlns:jfx="http://javafx.com" href="https://www.mysite.com/application/jws.jnlp;jsessionid=AC207723D2587F0CEE9944E604865EE3.jvm_21101">
  <information>
    <title>JNLP Internet Application</title>
    <vendor>Oracle Corporation</vendor>
    <homepage href="http://java.oracle.com/"/>
    <description>JNLP Internet Application</description>
  </information>
<resources os="Windows" arch="i386">    </resources>
<resources os="Windows" arch="x86">     </resources>
<resources os="Windows" arch="x86_64">  </resources>
<resources os="Windows" arch="amd64">   </resources>
<resources os="Linux"   arch="x86">     </resources>
<resources os="Linux"   arch="i386">    </resources>
<resources os="Linux"   arch="x86_64">  </resources>
<resources os="Linux"   arch="amd64">   </resources>
<resources os="Mac"     arch="i386">    </resources>
<resources os="Mac"     arch="x86_64">  </resources>
<resources os="SunOS"   arch="sparc">   </resources>
  <nativelib href="lib/solaris/corelibs.jar" download="eager"/>
  <jar href="windows/dpfpenrollment.jar" main="false" download="lazy" />
</resources>
  <security> ... </security>
  <application-desc> ... </application-desc>
</jnlp>

https://www.quora.com/in/Where-can-I-get-a-summer-internship-on-Core-Java-C++-HTML-and-CSS-in-India-for-summer-2015 Java(TM) Web Start

The Java Network Launch Protocol (JNLP) enables an application to be launched on a client desktop by using resources that are hosted on a remote web server. Java Plug-in software and Java Web Start software are considered JNLP clients because they can launch remotely hosted applets and applications on a client desktop. wiki

JNLP File Syntax

By default, jar and nativelib resources will be downloaded eagerly, i.e., they are downloaded and available locally to the JVM running the application before the application is launched. The jar and nativelib elements also allow a resource to be specified as lazy. This means the resource does not have to be downloaded onto the client system before the application is launched.

A jar denoted with download="progress" will be downloaded eagerly, and may be used to indicate progress while downloading other resources.

The download attribute is used to control whether a resource is downloaded eagerly, lazily, or contains a custom progress implementation. For example:

<jar href="sound.jar" download="lazy"/>
<nativelib href="native-sound.jar" download="eager"/>
<jar href="progress.jar" download="progress"/>

Note: If you have viewed this Java Web Start application before, clear your cache by using the Java Control Panel before viewing the application again. You will not be able to see a progress indicator for a previously cached application.

Java Web Start Development Examples :

Applet Development Examples

C:\Users\yashwanth.m>javaws https://docs.oracle.com/javase/tutorialJWS/samples/deployment/NotepadJWSProject/Notepad.jnlp
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0" codebase="https://docs.oracle.com/javase/tutorialJWS/samples/deployment/NotepadJWSProject">
   <information>
      <title>Notepad Demo</title>
      <vendor>Oracle Corporation</vendor>
   </information>
   <resources>
      <property name="jnlp.publish-url" value="$$context/publish"/>
      <j2se version="1.3+" java-vm-args="--permit-illegal-access" href="http://java.sun.com/products/autodl/j2se"/>
      <jar href="Notepad.jar"/>
   </resources>
   <application-desc main-class="Notepad"/>
</jnlp>

Location C:\Users\yashwanth.m\AppData\LocalLow\Sun\Java\Deployment\cache\

JavaJDK8 Web Start Log message.

-----------
WARNING: the jnlp file is invalid and will be blocked in a future release.
Exception: org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 53;
           The reference to entity "height" must end with the ';' delimiter.
-----------

NOTE: Be sure that you sign your jar file also. Jar Signing


Java stores Temporary file on my computer

JNLP files are cached at this location.

  • Open the Java Control Panel
  • On the General Tab, Temporary Internet Files section, click Settings.
  • You can see the location where temporary files are stored and how much Disk space is set for storing them.

To Launch JNLP file and to Run the resources after the appropriate security prompts, Add the URL in Exception Site List.

  • On the Security Tab, Exception Site List section, click on Edit site List and Add the URL.

After Modifying the JAR file if you are Unable to get/download the latest data of JAR, then delete all java cache files from this location.

WIN : C:\Users%User Name%\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\


JAVA 9

Module java.jnlp Defines the API for Java Network Launch Protocol (JNLP). This module is upgradeble.

Module Graph:

Module graph for java.jnlp

Java9 JNLP SAXParseException - missing quote for value of "height" element

⚠️ **GitHub.com Fallback** ⚠️