Top || Section Contents || Permuted Index
SavaJe OS 1.1.0

jnlp(shell)


NAME

jnlp — execute a program using a JNLP-style descriptor

SYNOPSIS

jnlp [-dump] [file | url]

DESCRIPTION

Execute the program described using a JNLP-style (Java network launching protocol) descriptor file or URL provided. SavaJe OS currently uses JNLP-style descriptor files to characterize applications and to locate resources. Note that neither the jnlp command nor the GUI shell are currently compliant JNLP clients (i.e., not all the tags or semantics are supported). For example, application JAR files specified in .jnlp files are downloaded (eagerly), but the JAR files are not cached permanently after the application exits. This page describes the tags and semantics of descriptor files understood by SavaJe OS .

There is also a -dump option to the jnlp command that parses the JNLP file and prints a description of the data.

EXAMPLES

Writing a JNLP-style descriptor file

The file or URL should have a .jnlp extension. Assume that the application test.awt.Notepad is packaged in a JAR file /cf0/testNotepad.jar . The following JNLP descriptor file can be used to launch this application:

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0" href="file:///cf0/notepad.jnlp">

<information>
    <title>NoteP</title>
    <vendor>savaJe technologies inc.</vendor>
    <homepage href="www.savaJe.com"/>
    <description>test Notepad</description>
    <icon href="file:///cf0/pics/notepad.gif"/>
</information>

<security>
</security>

<resources>
    <jar href="file:///cf0/testNotepad.jar"/>
</resources>

<application-desc main-class="test.awt.Notepad">
    <argument>-test</argument>
</application-desc>

</jnlp>

Note that the JAR file mentioned in the <resources> tag is equivalent to setting the application classpath (or set base in SavaJe OS ). If you have multiple JAR files that need to be searched for application classes, include a <jar href="URL"/> line for each of them. This application can be launched from the command line with the following command (assuming the descriptor file name is testNotepad.jnlp :

lsh% jnlp testNotepad.jnlp

Icons

The icon specified in the <icon/> tag of the JNLP descriptor file will be displayed on the SavaJe OS GUI. The current SavaJe OS GUI uses 32-pixel by 32-pixel icons.

Execution flags

You can specify execution flags analagous to the -nosm (no security manager) and -noverify (no bytecode verification) options of run(shell) in the JNLP file. The following example shows the section (separate from the general <resources> section) needed to turn on both flags:

<resources os="savaJe">
    <property name="flag" value="-NOSM" />
    <property name="flag" value="-NOVERIFY" />
</resources>

All the execution flags are described below.

-DEBUG set the debug flag for the process (debugger yet to come)
-MULTI allow more than one instance of the application
-NOSM run the application without a security manager
-NOVERIFY do not verify the bytecode. This may be necessary for applications compiled with earlier versions of the JDK.

Putting an application launcher on the GUI

To have your own application appear in the GUI shell, create the file guicfg.xml and place it in the directory /filesystem /jre/savaJe/> where filesystem is one of the romfs or fatfs drives (/apps or /cf0 ). An example guicfg.xml appears below:

<savaJe-guicfg>
    <group name="applications">
        <appbutton> file:///cf0/jnlp/testNotepad.jnlp </appbutton>
    </group>
</savaJe-guicfg>

This configuration file specifies that the application described by testNotepad.jnlp be placed in the applications tab of the GUI.

For information on creating a new romfs file system, see romfs(doc) .

SEE ALSO

romfs(doc)


Aug. 6, 2002
Copyright © 2002 , SavaJe Technologies, Inc. All rights reserved.
Corrections, suggestions to: docs@savaje.com