Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Simulations

Web Start

Java Web Start allows standalone applications can be deployed with a single click over the network. This distribution mechanism is well suited for large packages, such as Java E-books and Launcher packages, that contain multiple simulations and narratives. Web Start ensures that the most current version of the application is deployed. Another advantage of Web Start deployment over applets is that this mechanism overcomes compatibility problems with browsers and different Java versions.

Example: A hyperlink to the jnlp file downloads and installs a Launcher package of OSP demonstration programs.

JNLP Files

A Web Start application is installed using a Java Network Launching Protocol (JNLP) file. A JNLP file is an XML file that specifies the application and its properties. This file is placed on a web server that hosts the jar file containing the Java application.

<jnlp codebase="http://www.compadre.org/osp/images/jars/" href="http://www.compadre.org/osp/jnlps/osp_demo/" version="1.0"> <information> <title>OSP Web Start Demonstration</title> <vendor>ComPDARE OSP Collection</vendor> <homepage href="http://www.compadre.org/osp/"/> <description>Open Source Physics Demonstration Programs</description> <description kind="short">Java Web Start distribution of Open Source Physics Demonstration Programs</description> <icon href="http://www.compadre.org/osp/images/jars/osp.jpg"/> <offline-allowed/> </information> <security> <all-permissions/> </security> <resources> <j2se version="1.5+"/> <jar href="osp_demo.jar"/> </resources> <application-desc main-class="org.opensourcephysics.tools.Launcher"> <argument>osp_demo.xset</argument> </application-desc> </jnlp>

Web Start Tutorial

There are many Web Start tutorials on the Internet. Two of the most readable are on the following sites:

The OSP Network:
Open Source Physics - Tracker - EJS Modeling
Physlet Physics
Physlet Quantum Physics