Java thousand ask _08jdk detailed (011) _JNLP file is what

Source: Internet
Author: User

Click to enter _ more _java thousand ask

1. What is a JNLP file?

JNLP (Java Network launching Protocol, Java Web Execution protocol file) is a way for Java to execute Java applications directly from a browser, It allows you to open a Java application directly from a URL link on a Web page.

Java Desktop applications can be published in a JNLP manner. If the version is upgraded, it is not necessary to release the version to all users, only the version of the server needs to be updated, which is equivalent to the advantages of having a Java application with a Web application. If you use JNLP to package an application, it can:

    • Install and use the correct version of the JRE (Java Runtime Environment).
    • Load the application from a browser or desktop.
    • Detects the new version and automatically downloads the latest version.
    • To speed up the startup, the classes that the application needs are cached in the native cache.
    • Download the original library if necessary.
    • Use native resources such as file systems in a secure manner.
    • Automatically locates and loads externally dependent resources.

We can use the Javaws command to download and run the Java applications maintained in the JNLP file. Learn Javaws See here: What is the difference between Java, JAVAW, javaws

2. What are the benefits of using JNLP?

Publishing an app with the JNLP file has the following benefits:

    • Others cannot change the content of your JNLP file, such as adding a random library, or changing the application's information.
    • Allows arbitrary Java Virtual Machine (JVM) options and Java System Properties to be used in the application.
    • Prevent others from referencing your applet jar file directly in the HTML browser.
3. What is the Jnlp file like?

JNLP is a standard file that describes the URL of the application, the basic information about the application (application name, version, vendor, app icon, etc.), the necessary system environment, and so on.

Template name: Jnlp-inf/application_template. JNLP. The name must be uppercase. The template content is as follows:

<?xml version= "1.0" encoding= "UTF-8"?><jnlp codebase="*"><information><title>SampleApp</title><vendor>Sample Company</Vendor><icon href="*"/><offline-allowed/></Information><resources><java version="1.3+"/><jar href="Sampleapp.jar"/></Resources><application-desc main-class="com.sample.SampleApp"/></jnlp>

Java thousand ask _08jdk detailed (011) _JNLP file is what

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.