Usage

Perhaps the best way to describe TheLittleContainer is to show it in action.

Using the minimal distribution, TheLittleContainer is a small, self-executable JAR file. On Windows and Mac OS, you can launch it by simply double-clicking it. Alternatively, from the shell you can execute:

${TLC_HOME}$ bin/tlc.sh

Or, on Windows:

${TLC_HOME}> bin/tlc.bat

On the minimal distribution, running TheLittleContainer as is will simply display some output then quit. That's because it really has nothing to do! There's nothing in the target directory for TLC to work on.

If you drop the TheLittleContainer-filelogger.jar into the target directory then re-run TheLittleContainer, you should see one line of console output. Afterwards, the rest of the output will be written to a file ${TLC_HOME}/logs/TheLittleContainer.log

Your first Lightweight App

Implement java.lang.Runnable

Drop the class into the target directory

Fire up TheLittleContainer

Watch console output

Add logging capability

Drop TheLittleContainer-filelogger.jar into the target directory

Fire up TheLittleContainer

Open the log file to see the output

Package your class as a Jar

Package it

Drop your Jar into the target directory (remove the class earlier)

Fire up TheLittleContainer

Create a property file to control logging output

Show sample property file here to rename the logging file, change the log formatting, etc.

Fire up TheLittleContainer

Open the new log file

Creating a threaded application with lifecycle support

Implement net.sf.TheLittleContainer.LifeCycle

Package your class and drop it into the target directory

Run ${TLC_HOME}/bin/startup.sh to start the TheLittleContainer

Run ${TLC_HOME}/bin/shutdown.sh to shutdown TheLittleContainer

View the logfile for output