Java Web Start Introduction

xiaoxiao2021-03-06  22

First, Java Web Start Technology

Java Web Start is an application related to a web browser. When a user clicks to a super connection to a specific startup file (JNLP file), the web browser will prompt the Java Web Start, Java Web Start will automatically download, cache, and run a given Java technology. This whole process will not require any user intervention in addition to the initial click.

From a technical point of view, Java Web Start technology has a variety of key advantages to make a platform for application deployment.

1. Java Web Start technology is dedicated to launching a J2SE (Java 2 SE Platform) application. But applications can be developed on a web server and can be configured on other platforms, including Windows 98 / NT / 2000 / ME / XP, Linux, Solaris operating system environment. The Java platform has been proven to be a great robust, efficient, multi-purpose development platform that saves costs by minimizing development and testing.

2. Java Web Start supports multiple revised versions of J2SE (Java 2 Platform, Standard Edition). In this case, an application can request a specific version of the platform you need, such as J2SE 1.4.0. Multiple applications can run different platforms at the same time without causing a conflict. If an application requires no platform versions installed on the client system, Java Web Start can automatically download and install the corresponding platform version.

3. Java Web Start allows applications outside the browser environment. If it is inconvenient or impossible to start from the browser, the application can be run offline. The application can also start through desktop shortcuts, which will cause a web deployment-based application like starting the local application as simple as it is.

4. Java Web Start inherits the security of the Java platform. Applications under Java Web Start technology will run in a protective environment (ie, Sandbox) in a protective environment, strictly limit access to local disk systems and network resources. This will allow users to securely run applications from the untroven area without worrying about the local security environment.

5. The application that started with Java Web Start will be cached locally. In this case, a downloaded application is equivalent to the installed application in the traditional sense. Java Web Start support technology is the Java Network Launching Protocol & API (JNLP) -java network launch protocol. This technology is currently developed through Java Community Process (JCP). Java Web Start is a reference implementation of JNLP specifications (RI). The JNLP technology is defined in a standard file format that describes how to start an application by calling a JNLP file.

Second, where to find Java Web Start

Java Web Start Site http://java.sun.com/products/javawebstart/, you can download Java Web Start. JNLP specification can be found here: http://java.sun.com/aboutjava/communityProcess/jsr/jsr_056_jnlp.html

Third, technical requirements

Desktop / client requirements

The client requires support for Java runtime environments The Java Runtime Environment (JRE) 1.2.2 or higher. Java Web Start is suitable for Windows 98 / NT / 2000 / ME / XP, Solaris operating system environment and Linux. Details Reference Readme Document http://java.sun.com/products/javawebstart/1.2/docs/readme.html2. Server requirements

The Java Web Start application can be deployed on a standard web server. In order to use Java Web Start, the web server must be configured to support a new MIME type that will be explained below.

Fourth, set the Web site

Java Web Start takes full advantage of the already existing Internet technology, such as HTTP protocols and web servers, which makes the existing basic system for deploying HTML content can be reused to use Java Web Start to deploy Java technology-based applications. In order to deploy your app on the client, you must ensure that all files containing the application can be accessed through the web server. This means you have to copy one or more JAR files that are consistent with JNLP files into your web server directory. Make the Web site to set up the Java Web Start similar to deploying HTML-based content files. The only thing you need to pay attention to is a new MIME type for the web server.

1. Configure the web server to use the Java Web Start Mime type

Configure the web server to set all the files that .jnlp to the extension to the Application / X-Java-JnLP-File Mime type. Most web browsers decide how to deal with specific content based on the MIME type returned from the web server. To make the web browser call Java Web Start, let the server returns a JNLP file to the Application / X-Java-JNLP-File Mime type. Each web server has a method of adding a MIME type. For the Apache web server, you must add the following line to the .mime.Types configuration file: Application / X-java-jnlp-file. JNLP For her server, check the relevant documentation.

2. Create a JNLP file to the application

Establishing a simple way to create a JNLP file is based on your request to modify the already existing JNLP file.

3. Make sure the application can access via the web server

Make sure your application's JAR files and JNLP files can be accessed with the URL listed in the JNLP file.

4. Create a super connection pointing to JNLP files on the web page

It is a standard HTML connection to the super connection to the JNLP file. For example, Launch My Application, follows the settings in the first step, the web server automatically returns all any files that are .jnlp to extension, automatically returns the Application / X-Java-JNLP-File MIME type. This is the prerequisite for ensuring the Java Web Start when the web browser is downloaded when downloading this file. A link to a Java Web Start installer should also be provided on the web, which will enable users who have not installed Java Web Start to download and install Java Web Start. Detection of the Java Web Start is installed: Use JavaScript / VBScript in the HTML page to detect whether Java Web Start is installed.

V. Use automatic download characteristics

"One click" automatic download and installation of Java Web Start 1.2 makes it easier to use end users of Java Web Start.

Description: This feature is only supported in Microsoft Windows platform. In order to use this feature, developers must provide some scripts in the web page residing in their application. These scripts will be used to determine that the end user's browser is Netscape Navigator or Internet Explorer, and the Java Web Start is installed in the client system. Based on these test results, other scripts in the web page will begin to automatically download and install Java Web Start, followed by downloading and installing applications. 6. Technical disadvantages

1. Because Java Web Start is not a new performance technology, it does not belong to the scope of performance technology, and it cannot regard it as a performance technology. He has enhanced the client's performance.

2. Set the client complicated because you want to install the Java Web Start's running environment in each client, so it will eventually lead to the nightmare of maintenance. Especially for those who are less professional, it will eventually lead to system maintenance from B / S to "C / S" structure.

3. Java Web Start only has a role in the window client (such as AWT, SWING, SWT), which does not have a big effect on the client using JSP, JSF performance.

转载请注明原文地址:https://www.9cbs.com/read-57221.html

New Post(0)