webstart guide

From autoplot.org

Jump to: navigation, search

A JNLP file (Java Network Launching Protocol) is an XML file that is used to allow a user to automatically start a Java program by selecting a link in a web browser. The program will be downloaded and installed if it has not been previously installed or if an update is required.

The best way to create Autoplot JNLP files is to use our web service described on this page. (Server-side code is maintained in repository at in directory VirboAutoplot/src/external).

The web service allows links to be created that cause Autoplot to launch in a certain configuration. For example, if the following link is placed on a web page


and clicked, Autoplot will open and render the URI



  1. Basic
  2. Advanced
    1. Memory Limits
    2. PngWalkTool
    3. AutoplotUI

1. Basic

http://autoplot.org/autoplot.jnlp?uri=URI                   (deprecated)
http://autoplot.org/autoplot.jnlp?version=VERSION&uri=URI   (deprecated)

where URI is the full URI to be placed in the address bar when Autoplot starts and VERSION is any directory listed at http://autoplot.org/jnlp. See Main_Page#Formats_Read and below for example links. Each time a link is clicked a new instance of Autoplot is started. (Eventually there will be an option to allow the user to click a link and have the URI plotted above, below, or over an existing plot if Autoplot is already running.)


2. Advanced

A jnlp file may be requested that will launch Autoplot in a manner that is identical to as if it were started from the command line with any of the available command line options. The arguments for the service are the same as the long form of the command line options. For example,

wget -O - "http://autoplot.org/autoplot.jnlp?main-class=org.autoplot.pngwalk.PngWalkTool1&nativeLAF=true&qualityControl=true" > auto.jnlp
javaws auto.jnlp

is the same as

wget http://autoplot.org/jnlp/latest/autoplot.jar
java -cp autoplot.jar org.autoplot.pngwalk.PngWalkTool1 --nativeLAF=true --qualityControl=true

2.1. Memory Limits

By default all the .jnlp files specify a 1G memory limit for Autoplot. This is proving to be quite limiting, and to ease this you can now request a JNLP file with a larger memory allowance:

wget -O - "http://autoplot.org/autoplot.jnlp?max-heap-size=4G" > auto.jnlp

Note that some platforms, specifically Windows XP, don't allow more memory than the default 1024K, so please realize that products made on a larger Autoplot may not be usable elsewhere.


2.2. PngWalkTool

The options for main-class=org.autoplot.pngwalk.PngWalkTool1 are

template=[URI] start with this URI template (must be the last argument in the link)
nativeLAF=[true|false] use the system look and feel (default: true)
mode=[grid|filmStrip|covers|contextFlow] initial display mode
goto=[2010-01-01] start display at the beginning of this range
qualityControl=[true|false] enable quality control review mode (default: true)

Example link (note that the template argument is last):


or from the command line

wget -q -O auto.jnlp 'http://autoplot.org/autoplot.jnlp?main-class=org.autoplot.pngwalk.PngWalkTool1&nativeLAF=true&qualityControl=true&mode=grid&goto=2010-01-01&template=http://autoplot.org/data/pngwalk/product_$Y$m$d.png'
javaws auto.jnlp

2.3. AutoplotUI

The options for main-class=org.virbo.autoplot.AutoplotUI are

bookmarks=[URL] bookmark URL to load 
open=[URI] open this URI (must be the last argument in the link)
logConsole=[true|false] enable log console (default: false)
scriptPanel=[true|false] enable script panel (default: false)
script=[URI] run this script after starting.  Arguments following are passed into the script as sys.argv
nativeLAF=[true|false] use the system look and feel
print=[URI] print this URI
port=[NUM] enable scripting via this port

Example (note that the open argument is last):

wget -O auto.jnlp 'http://autoplot.org/autoplot.jnlp?scriptPanel=false&logConsole=false&open=http://autoplot.org/data/autoplot.cdf'
javaws auto.jnlp
Personal tools