Java Web Start
From Wikipedia, the free encyclopedia
In computing, Java Web Start (also known as JavaWS or as javaws), a framework developed by Sun Microsystems, allows users to start application software for the Java Platform directly from the Internet using a web browser.
Contents |
[edit] Functionality
Unlike Java applets, Web Start applications do not run inside the browser, and the sandbox in which they run need not have as many restrictions, although this can be configured. Web Start has an advantage over applets in that it overcomes many compatibility problems with browsers' Java plugins and different JVM versions. On the other hand, Web Start programs cannot communicate with the browser as easily as applets. To assist migration, users can also invoke a Java Applet as a Java Web Start application.
[edit] Implementation
Java Web Start provides a series of classes in the javax.jnlp
package which provide various services to the application. Sun designed most of these services with the aim of allowing carefully controlled access to resources (such as files and the system clipboard) while restricting the application to authorized operations.
Sun introduced version 1.0 of Web Start in March 2001.[1] Since J2SE 1.4 Web Start comes as a default part of Java Runtime Environment (JRE) called javaws
, and computer administrators no longer have to install it separately.
Java Web Start resembles ClickOnce in the .NET framework.
[edit] Java Network Launching Protocol (JNLP)
Programmers often speak of the Java Network Launching Protocol (JNLP) interchangeably with the term "Web Start". The JNLP protocol, defined with an XML schema, specifies how to launch Java Web Start applications. JNLP consists of a set of rules defining how exactly to implement the launching mechanism. JNLP files include information such as the location of the jar package file and the name of the main class for the application, in addition to any other parameters for the program. A properly configured browser passes JNLP files to a Java Runtime Environment (JRE) which in turn downloads the application onto the user's machine and starts executing it. The development of JNLP took place under the Java Community Process as JSR 56. It includes the original 1.0 release, the subsequent 1.5 maintenance release, and as of 2006[update], the pending 6.0 maintenance release. JNLP comes free of charge; developers need not pay a license fee in order to use it in programs.
Important Web Start features include the ability to automatically download and install a JRE in the case where the user does not have Java installed, and for programmers to specify which JRE version a given program needs in order to execute. The user does not have to remain connected to the Internet to execute the downloaded programs, because they execute from a locally-maintained cache. Updates of the software download from the Web become available when the user has a connection to the Internet, thus easing the burden of deployment.
Any computer user can use JNLP by simply installing a JNLP client (most commonly Java Web Start). The client installation can occur automatically, so that the end users can see the client launcher downloading and installing before the Java application the first time they launch the latter.
JNLP works in a similar fashion to how HTTP/HTML works for the web. For rendering a HTML webpage, after the user clicks on a weblink, the browser submits a URL to a webserver, which replies with a HTML file. The browser then requests the resources referred to by this file (images, css), and finally renders the page once it has received enough information. Page rendering usually starts before all resources have downloaded; some resources not critical to the layout of the page (such as images), can follow on afterwards — or on request if the "Load Images Automatically" browser-setting remains unset.
JNLP mirrors this process; in the same way that a Web browser renders a webpage, a JNLP client "renders" a Java app. After the user clicks on a weblink the browser submits a URL to a webserver, which replies with a JNLP file (instead of a HTML file) for the application. The JNLP client parses this file, requests the resources specified (jar files), waits for the retrieval of all required resources, and then launches the application. The JNLP file can list resources as "lazy", which informs the JNLP client that the application does not need those resources to start, but can retrieve them later on when/if the application requests them.
[edit] Pack200 compression
To reduce the size of a Java Web Start application Sun Microsystems introduced a compression system called Pack200 in Java 1.5.0. It reduces byte counts so efficiently that it can compress a large file to one-ninth of its original size.
Java Web Start has supported Pack200 since it first appeared, but initially this feature required server-side cooperation and a certain amount of expertise to set up. When SUN introduced J2SE 6u10, Pack200 support became available without the need for special server support. Application designers can enable or disable this feature within JNLP files.
On slow connections Pack200 gives a significant performance boost in application startup time and download time.
[edit] Signed Web Start applications
By default, Java Web Start applications run "restricted", which means that they do not have access to some system resources such as local files. But publishers can remove these restrictions by signing their Web Start applications with the jarsigner
tool that comes with the JDK.
[edit] Well-known applications
- Clockwiser – a free puzzle game
- CrossFTP – a user friendly FTP client and server
- DataReport Tool – a tool developed by Caprion Proteomics for viewing, analyzing and filtering a set of differentially expressed proteins
- Genie Workbench – a set of film production automation tools.
- Kaijudo Portal – an online platform for playing the Duel Masters Trading Card Game in KirriCorp and Japanese formats.
- PowerTeacher – a gradebook program for student scores: part of the PowerSchool student information system used by schools
- PoxNora – a 3/4 perspective, turn-based strategy, collectible card game
- Wurm Online – a 3D Massively Multiplayer Online Fantasy Simulator.
- eCribbage.com A large cribbage community using Java Web Start
[edit] See also
- Zero Install - a similar system which works for non-Java applications.
[edit] References
[edit] External links
- Sun's Java Web Start product page
- Deploying Software with JNLP and Java Web Start
- Java Web Start Architecture JNLP Specification & API Documentation
- JSR 56 (JNLP 1.0, 1.5 and 6.0)
- Startdirectory Connect and Work
- Java Web Start tutorial
- Getting Started with Java Web Start
- JNLP implementations other than Sun's reference implementation:
|