Java Web Start
Encyclopedia
In computing
Computing
Computing is usually defined as the activity of using and improving computer hardware and software. It is the computer-specific part of information technology...

, Java Web Start (also known as JavaWS, javaws or JAWS) is a framework
Software framework
In computer programming, a software framework is an abstraction in which software providing generic functionality can be selectively changed by user code, thus providing application specific software...

 developed by Sun Microsystems
Sun Microsystems
Sun Microsystems, Inc. was a company that sold :computers, computer components, :computer software, and :information technology services. Sun was founded on February 24, 1982...

 (now Oracle
Oracle Corporation
Oracle Corporation is an American multinational computer technology corporation that specializes in developing and marketing hardware systems and enterprise software products – particularly database management systems...

) that allows users to start application software
Application software
Application software, also known as an application or an "app", is computer software designed to help the user to perform specific tasks. Examples include enterprise software, accounting software, office suites, graphics software and media players. Many application programs deal principally with...

 for the Java Platform directly from the Internet
Internet
The Internet is a global system of interconnected computer networks that use the standard Internet protocol suite to serve billions of users worldwide...

 using a web browser
Web browser
A web browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier and may be a web page, image, video, or other piece of content...

.

Functionality

Unlike Java applet
Java applet
A Java applet is an applet delivered to users in the form of Java bytecode. Java applets can run in a Web browser using a Java Virtual Machine , or in Sun's AppletViewer, a stand-alone tool for testing applets...

s, Web Start applications do not run inside the browser. However by default they run in the same sandbox
Sandbox (computer security)
In computer security, a sandbox is a security mechanism for separating running programs. It is often used to execute untested code, or untrusted programs from unverified third-parties, suppliers, untrusted users and untrusted websites....

 as applets, with several minor extensions like allowing to load and save the file that is explicitly selected by the user through the file selection dialog. Only signed applications can be configured to have additional or even all permissions.

Web Start has an advantage over applets in that it overcomes many compatibility problems with browsers' Java plugins and different JVM
Java Virtual Machine
A Java virtual machine is a virtual machine capable of executing Java bytecode. It is the code execution component of the Java software platform. Sun Microsystems stated that there are over 4.5 billion JVM-enabled devices.-Overview:...

 versions. On the other hand, Web Start programs are no longer part of the web page. They are independent applications that run in separate frame.

Web Start can also launch unmodified applets that are packaged inside .jar files, by writing the appropriate JNLP file. This file can also pass the applet parameters. Such applets also run in a separate frame. Applet launcher may not support some specific cases like loading class as resource.

Same as applets, Java Web Start is cross platform. Open source implementation, if preferred, is available as part of the OpenJDK
OpenJDK
OpenJDK is a free and open source implementation of the Java programming language. It is the result of an effort Sun Microsystems began in 2006...

.

Implementation

The developer prepares a special XML file with JNLP extension. This file describes the application requirements, code location, parameters and additional permissions (if any). The browser downloads this file as any other and (following its MIME type, application/x-java-jnlp-file) opens it with Web Start tool. Web Start tool downloads all necessary resources and launches the application.

Java Web Start provides a series of class
Class (computer science)
In object-oriented programming, a class is a construct that is used as a blueprint to create instances of itself – referred to as class instances, class objects, instance objects or simply objects. A class defines constituent members which enable these class instances to have state and behavior...

es in the javax.jnlp package
Java package
A Java package is a mechanism for organizing Java classes into namespaces similar to the modules of Modula. Java packages can be stored in compressed files called JAR files, allowing classes to download faster as a group rather than one at a time...

 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, while 64-bit Windows support added only in Java 6 (later than 64-bit Java was first available). Since J2SE
Java Platform, Standard Edition
Java Platform, Standard Edition or Java SE is a widely used platform for programming in the Java language. It is the Java Platform used to deploy portable applications for general use...

 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 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
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

 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
JAR (file format)
In software, JAR is an archive file format typically used to aggregate many Java class files and associated metadata and resources into one file to distribute application software or libraries on the Java platform.JAR files are built on the ZIP file format and have the .jar file extension...

 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
Java Community Process
The Java Community Process or JCP, established in 1998, is a formalized process that allows interested parties to get involved in the definition of future versions and features of the Java platform....

 as JSR 56. It includes the original 1.0 release, the subsequent 1.5 maintenance release, and , 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
Cache
In computer engineering, a cache is a component that transparently stores data so that future requests for that data can be served faster. The data that is stored within a cache might be values that have been computed earlier or duplicates of original values that are stored elsewhere...

. 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 installation can occur automatically such that the end user sees the client launcher downloading and installing the Java application when first executed.

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 an HTML file. The browser then requests the resources referred to by this file (images, css
Cascading Style Sheets
Cascading Style Sheets is a style sheet language used to describe the presentation semantics of a document written in a markup language...

), 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.

Example

The example below describes a simple JNLP to launch the applet, specifying code base, source, main class and window size. Such file contains all necessary references and is self-sufficient to launch the application. As no permissions are requested, the code will run in a sandbox. JNLP also states that this application can run offline (if already cached) and should be updated in a background.





Launch applet with Web Start
Foo Bar Inc.






name="Ray diagram applet" main-class="raydiagramsapplet.Main"
width="300" height="200">




Pack200 compression

To reduce the size of a Java Web Start application Sun Microsystems introduced a compression system called Pack200
Pack200
Pack200, specified in JSR 200, is an HTTP compression method by Sun for faster JAR file transfer speeds over the network. Pack200 may also refer to the Pack200 compression tools provided in Sun's JDK since 1.5.0, as well as the Pack200 compressed files....

 in Java 1.5.0. It reduces byte counts so efficiently that it can compress a large jar file to one-ninth of its original size if it contains only Java classes.

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 Java SE 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 performance boost in application startup time and download time.

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
Java Development Kit
The Java Development Kit is an Oracle Corporation product aimed at Java developers. Since the introduction of Java, it has been by far the most widely used Java SDK. On 17 November 2006, Sun announced that it would be released under the GNU General Public License , thus making it free software...

.

Well-known applications

  • ArgoUML
    ArgoUML
    ArgoUML is an UML diagramming application written in Java and released under the open source Eclipse Public License. By virtue of being a Java application, it is available on any platform supported by Java....

     – an UML
    Unified Modeling Language
    Unified Modeling Language is a standardized general-purpose modeling language in the field of object-oriented software engineering. The standard is managed, and was created, by the Object Management Group...

     diagramming application.
  • Bloom a desktop app to easily upload photos and videos to Facebook
    Facebook
    Facebook is a social networking service and website launched in February 2004, operated and privately owned by Facebook, Inc. , Facebook has more than 800 million active users. Users must register before using the site, after which they may create a personal profile, add other users as...

  • CrossFTP – a user friendly FTP client and server.
  • Genie Workbench
    Genie Workbench
    Genie Workbench is a suite of film and television production software that assist filmmakers in many production tasks. Genie Workbench is the result of the collaboration between the Business Process Management Group of Queensland University of Technology and the Centre for Screen Business of ...

     – a set of film production automation tools.
  • Genevestigator
    Genevestigator
    Genevestigator is a web-based application developed for biologists and medical researchers to rapidly find out in which tissues, at which stages of development, and to what stimuli, drug treatments, diseases, or genetic modifications genes of given organisms are activated...

    , access engine to the curated bioinformatical database.
  • Jake2
    Jake2
    Jake2 is a Java port of the GPL release of the Quake II game engine.-History:The 0.9.1 version of Jake2 was shown by the JOGL team for JavaOne 2004, to present an example of Java-OpenGL interoperability...

     – A Java port of Quake 2.
  • [JShot] A Java-based screenshot capture application and image editor with integrated upload to image hosting sites
  • JabRef
    Jabref
    JabRef is a reference management software that uses BibTeX as its native format. JabRef provides an easy-to-use interface for editing BibTeX files, for importing data from online scientific databases, and for managing and searching BibTeX files....

     a reference management software that uses BibTeX
    BibTeX
    BibTeX is reference management software for formatting lists of references. The BibTeX tool is typically used together with the LaTeX document preparation system...

     as its native format
  • muCommander
    MuCommander
    muCommander is a cross-platform file manager that will run on any operating system supporting Java. It features a Norton Commander style interface to allow easy manipulation of files with many keyboard shortcuts. Pre-compiled builds are available for Mac OS X, Windows, Linux, Solaris, *BSD, etc.In...

     A file Manager and Norton Commander clone with SSH and ftp features
  • PowerFolder – a popular network sync and sharing freeware.
  • PowerTeacher – a gradebook program for student scores: part of the PowerSchool
    PowerSchool
    PowerSchool is a student information system product of Pearson's Assessment & Information group.-History:PowerSchool was purchased by Apple Inc. on March 13, 2001....

     student information system used by schools.
  • PoxNora
    PoxNora
    PoxNora: Battlefield of the Immortals is a multiplayer online game that combines a collectible card game with a turn-based strategy game in a fantasy setting. PoxNora was originally launched via Java Web Start through a browser and can be played on Microsoft Windows, Mac OS X, and Linux...

     – a 3/4 perspective, turn-based strategy
    Turn-based strategy
    A turn-based strategy game is a strategy game where players take turns when playing...

    , collectible card game
    Collectible card game
    thumb|Players and their decksA collectible card game , also called a trading card game or customizable card game, is a game played using specially designed sets of playing cards...

    .
  • Tropic Euro – an online adaptation of the board game Puerto Rico.
  • Wurm Online
    Wurm Online
    Wurm Online is a 3D MMO produced by Code Club AB in Sweden that allows players to choose between a PvP game and a non-PvP game based on different servers. Development started in 2003 by friends Markus Persson , and Rolf Jannson.-Gameplay:...

     – a 3D Massively Multiplayer Online Fantasy Simulator.
  • Haven & Hearth – is a MMORPG set in a fictional world loosely inspired by Slavic and Germanic myth and legend.

See also

  • Java applets, another Java application deployment technology.
  • Zero Install
    Zero Install
    Zero Install is a means of distributing and packaging software for multiple operating systems . Many distributions offer it as an additional non-default component.- Design :...

    , a similar system which works for non-Java applications.
  • ClickOnce
    ClickOnce
    ClickOnce is a Microsoft technology that enables the user to install and run a Windows application by clicking a link in a web page. ClickOnce is a component of Microsoft .NET Framework 2.0 and later, supports deploying applications made with Windows Forms or Windows Presentation Foundation...

    , Microsoft
    Microsoft
    Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

     .NET
    .NET Framework
    The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...

    's similar framework.
  • RUNZ.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK