Context Toolkit Installation Guide

This document contains the installation guide for the Context Toolkit. This is just one piece of the user's guide. There are two other pieces, including a tutorial and source code documentation. The installation guide contains information on how to install the Context Toolkit and get a simple application up and running.


  1. Download and install the Java J2SE SDK. JDK 1.2.2 or higher is recommended. If you already have Java or a Java IDE installed, you may skip this step.
  2. Download the Apache Ant build tool and follow the Ant installation instructions. Ant is used as a command-line tool to execute various applications distributed with the CTK.
  3. Download the latest CTK distribution from sourceforge. The distribution should consist of a file called
  4. Unzip the file into a directory of your choosing, heretofore referred to as <INSTALLDIR>.
  5. Inside the <INSTALLDIR> directory should be a jar file, ctk.jar. Add ctk.jar to your general CLASSPATH environment variable. For use in a Java IDE, follow the IDE instructions to add ctk.jar to your project.
  6. The CTK depends on certain third party libraries, included in the distribution. Include <INSTALLDIR>/lib in your CLASSPATH or IDE as detailed for ctk.jar above. gwe.jar is from GWE Technologies and provides the JDBC access to the MySQL database. aelfred.jar is from Microstar Software and provides XML decoding. sax.jar is from Megginson Technologies and provides support for multiple XML decoders. ntp.jar is from Limburgs Universitair Centrum and provides support for talking to a Network Time Protocol server. To retrieve ntp.jar, unzip the file. All of the jar files are free to use and redistribute.
  7. When using the CTK in an IDE, it can be convenient to attach source files to libraries to aid in debugging. The distribution includes with all CTK source .java files.
  8. Optionally modify the name of the Network Time Protocol server used in context.arch.widget.OffsetThread to a local NTP server. Currently, the server is set to You'll get a faster response, if you use an NTP server that is fewer network hops from your installation location.

Running a Simple Application

After installing the CTK, try running this sample application. You can run it in one step using the provided Ant target, or run each component by hand. Your machine should have networking enabled (The CTK Discoverer utilizes IP Multicast which requires an active network interface on some operating systems):

Running a Simple Enactor Application

Next, try running an application that uses an Enactor component to acquire context data. Like the simple application above, you can run the application easily using a single Ant target, or you can execute all of the components individually on the command line:
Back to the UserGuide

Context Toolkit Home
Last Modified: December 23, 2003
Comments to: