Thinlet separates the GUI description and the business logic. The following overview pages, the Widgets, and the API tab includes guidance to develop XML and Java sources. This page contains instructions about deployment.

To compile and run thinlet related codes you have to add the thinlet.jar file to the CLASSPATH environment variable. To ensure that generated class files will be compatible with 1.1 VMs use the -target 1.1 compilation option. For smaller class file use the -g:none option, it won't generate any debugging information, thus it is not suggestible during development.

To deploy the applet or application create a jar file including your class, xml, image, and resource files.

jar cvfM myapp.jar myapp\*.class myapp\*.xml

To deploy your thinlet instance (myapp.MyThinletInstance class in this example) as applet using the AppletLauncher you have to create an html file, and move the myapp.jar and thinlet.jar files there (thinlet.jar includes AppletLauncher.class, FrameLauncher.class, and Thinlet.class). The applet tag in the HTML file is as follows:

<applet code="thinlet.AppletLauncher" archive="thinlet.jar, myapp.jar" width="320" height="200">
  <param name="class" value="myapp.MyThinletInstance" />

The AppletLauncher loads the class (given as class parameter), and creates an instance using the empty constructor, or a contructor with an applet parameter (thus you get this applet instance e.g. to get the further parameters of the applet HTML tag).

To deploy your thinlet application using the FrameLauncher you can archive your files including e.g. the following manifest information (in the myapp.mf file):

Main-Class: myapp.MyThinletInstance
Class-Path: thinlet.jar
// the text file must end with a new line or carriage return

jar cvmf myapp.mf myapp.jar myapp\*.class myapp\*.xml

In this case you have to deploy the thinlet.jar and myapp.jar files.