banner
Home
Installing
Example
Download Mailing list SourceForge ChangeLog Feedback

Example

To create a packlet:

  1. Write a manifest.xml file defining the packlet.

  2. Write template files for launch scripts.

  3. Run the packlet builder to generate your packlet:

             packlet manifest.xml path_to_packlet/yourPacklet.class
          

  4. Test the packlet:

             java -cp path_to_packlet yourPacklet
          

Here is an example manifest file and the appropriate launch script template for a Hello World examples.


manifest.xml

<!DOCTYPE manifest [
 <!ENTITY installer SYSTEM '../../installer.xml'>
]>
<manifest logo="logo.jpg">
    &installer;
    
    <var name="name" value="Hello"/>
    <var name="description" value="Hello world example"/>
    <var name="version" value="0.1"/>
    <var name="license" value="Some text to demonstrate the license screen."/>
    <var name="readme" file="readme.txt"/>

    <var name="root" function="getDefaultRoot" arg="hello-0.1"></var>
    <var name="encoding" function="getDefaultEncoding"></var>
    <var name="lf" function="getDefaultLF"></var>
    <var name="java.home" function="getJavaHome"></var>

    <text source="Hello.java" target="Hello.java"/>
    <binary source="Hello.class" target="Hello.class"/>
    <template source='hello.template' target='hello'>
        <flag>exec</flag>
    </template>
    <template source='hello.bat.template' target='hello.bat'>
        <flag>exec</flag>
    </template>
</manifest>


hello.template

export CLASSPATH={root}
export JAVA_HOME={java.home}
$JAVA_HOME/bin/java Hello





Last modified: Wed Sep 4 00:03:42 2002.

Copyright 2002 Michael Hartmeier.

Hosted at SourceForge.net Logo