Setting up Swarm on Debian Unstable

This page describes how Swarm was installed and configured on gamera, and is intended to be helpful for students installing Swarm on their own computers.

Other resources

Required Debian Packages

These packages from Debian Unstable are required to run the Java and Objective-C versions of Swarm, and to compile the example applications. Install them using "apt-get install packagename".

Required Third-Party Packages

These are required packages from elsewhere on the web.

When downloading the JDK, choose "J2SE 5.0 Beta 2" (or a newer one if available), then follow the "SDK" download link, not the JRE. Choose the "Linux self-extracting file" option, not the RPM. Once the file is downloaded, make it executable ("chmod +x file.bin") and run it ("./file.bin"). It will produce a new directory, "jdk1.5.0" - move this to /usr/local, so its new location is /usr/local/jdk1.5.0.

Install downloaded Debian packages using "dpkg -i package.deb".

put bltGraph.tcl in /usr/lib/blt2.4/

Symbolic links

These are links required to allow the hard-coded paths in the Swarm packages to work.

Environment variables

These are required for java and swarm to find their libraries at runtime. You can specify them manually on the terminal before running, in your user init scripts, or in the system-wide init scripts. Additionally, you may wish to include the bin directory from your new JDK installation in your PATH, specified in .bash_profile and .bashrc for single users and in /etc/profile and /etc/bash.bashrc for system-wide. This is not necessary for Swarm.

Makefile changes

Additional changes to the Makefile required to compile packages

Example code (and modifications required)

The example packages can be obtained here: Objective-C swarm apps and Java Heatbugs. Download and unpack them in your home directory. The following code modifications are required to compile them correctly:



These changes have already been made to the example packages named above at the following location on gamera: /usr/local/share/swarm - you can simply copy this directory to your home directory to test whether your system is working.

Compiling and running

To compile an application, run make in the application's directory.

To run an application:

Make sure that you have an X11 environment available when you run the applications. Failing to do this will produce an obscure error: TkExtra. To be certain you have an X11 environment, run an application such as xeyes or xlogo and check whether it displays on your screen.

James Ballantine, 6/7/04