How to setup RePast
These instructions describe how to download/install/configure java, repast,
and ant so that you can run CSCS repast models on your computer.
(For more information about these demos, see pages under
RePast at CSCS.
Note that these instructions assume you are downloading to a Windows-based machine,
with a typical C: disk with plenty of space available (approximately 150MB).
If you have a non-standard setup, or you are installing under linux, the details
regarding directory names and locations may be different, but in general
the steps will be the same. If you have an Apple running Mac OS X 10.4 or greater, please follow these instructions.
The instructions are broken down into these steps:
I. How to download and install Java
II. How to download and install RePast
III. How to download and install ant
IV. How to download and install the CSCS Custom Libraries
V. How to setup Windows Environment Variables for Java and Ant
VI. How to download, install, and run demos from UM
- How to download, install, and run the MinimalA demo
- How to download, install, and run the Template2 demo
- How to download, install, and run the heatBugs2 demo
How to download and install Java
Reminder: these are instructions for Windows 2000. See the Sun/Java instructions
for other computers/OpSystems.
1. Go to http://java.sun.com/j2se/downloads/index.html
2. Download the latest version of the Java 2 Standard Edition (J2SE) SDK
(currently J2SE 5.0, internal version number 1.5.0);
e.g., go to the page "Download JDK" under the JDK 5.0 Update X (X = 1 as of 3 Jan 2005)
to get the version without NetBeans.
Follow the download instructions to get the version appropriate for your computer/OpSystem.
3. Run the downloaded file to install java
- When the installation prompts for what components to install, click the "Change" button and change the installation
directory to that indicated in the download instructions, e.g.,
C:\jdk1.5.0_01
for Update 01 of version 1.5.0.
How to download and install RePast
1. Go to http://repast.sourceforge.net
2. Click the "Download" link along the left toolbar
3. Download the latest RePast suite installer (currently RePast 3.0)
4. Run the installer and install to C:\appl\repast\repast3.0
How to download and install Ant
1. Go to http://ant.apache.org/
2. Click the "Binary Distributions" link along the left toolbar
3. Download the latest Ant ZIP file (currently Ant 1.6.2)
4. Unzip this file to C:\appl using WinZIP or the Windows XP built-in ZIP utility
5. Rename the folder C:\appl\apache-ant-1.6.2 to C:\appl\ant1.6.2
How to download and install VisAD, Xerces, and the CSCS Custom Libraries
Some capabilities of these libraries are used by some of the UM Demos,
and you may want to use additional features in your own models.
The steps below describe how to download and install VisAD, Xerces, and the CSCS custom libraries.
VisAD is a Java library for creating graphs and analyzing
numerical data.
Xerces is a Java library that provides tools to parse XML files.
The CSCS custom libraries consist of these key jar files:
/appl/java/CSCS/hbbeta2-printf.jar:
This includes support so you can use C style "printf" to print things on the screen
instead of the usual java "System.out.print".
Note: Java 5.0 (1.5.0) now provides similar functionality
in its Format class (for output like printf and sprintf in C),
and its Scanner class for input (but this is NOT like sscanf in C).
/appl/java/CSCS/ioutils.jar:
This adds functions to make it easier to do input and output to and from files.
/appl/java/CSCS/graph3d.jar:
This is a simple library to create 3D surface plots.
To install VisAD, Xerces, and the custom CSCS libraries follow these steps:
1. Click this link to download visad-xerces-cscs-custom-libraries.zip
2. Unzip this file to C:\appl using WinZIP or the Windows XP built-in ZIP utility
How to setup Windows Environment Variables for Java and Ant
1. Go to the Windows Control Panel (Start->Settings->Control Panel OR Start->Control Panel)
2. Double click "System"
NOTE: In Windows XP, if you do not see "System" you might need to click "Switch to Classic View" first.
3. Click the "Advanced" tab
4. Click the "Environment Variables" button
5. Click "New" to add a variable
6. For "Variable Name" put:
JAVA_HOME
7. For "Variable Value" put:
C:\jdk1.5.0_01
or whatever location you specified when installing Java 5.0 on your computer.
8. Click the OK button
9. Find the variable "PATH" and click the "Edit" button
10. Add this to the end of the string for "Variable Value":
C:\jdk1.5.0_01\bin;C:\appl\ant1.6.2\bin
11. Click the OK button until you get back to the control panel
12. Close the control panel
How to download, install, and run demos from UM
All of the UM models use the above tools (java, repast, ant, visad, xerces, custom libs)
so that they can easily be used to run in GUI mode or batch mode with drone.
The steps to download a model and run it on your computer are similar to the steps below for
any of the UM models because all of them use these common tools.
A brief description of these demos is
here.
You can find more information about each one in the Readme.txt file
that is unpacked from their respective jar files.
Note: Earlier versions of these demos described
here.
How to download, install, and run the MinimalA demo
1. Create the folder C:\appl\repast\demos\MinimalA
2. Download the latest JAR file from here and save it
into the C:\appl\repast\demos\MinimalA folder
(For example, the jar file MinimalA-041019-1858.jar is from 2004 Oct 19 at 18.58.)
3. Open up a "Command Prompt" window
- Go to Start->Run
- Type "cmd" in the box and click "OK"
4. Change to the C:\appl\repast\demos\MinimalA folder by typing this in the "Command Prompt" window:
cd \appl\repast\demos\minimalA
5. UnJAR the MinimalA file by typing this in the "Command Prompt" window:
jar xvf MinimalA-XXXXX-XXXX.jar
NOTE: Fill in the correct file name date/time stamp where the X's are, e.g.
MinimalA-041019-1858.jar .
6. Then type this to run the demo:
ant run
How to download, install, and run the Template2 demo
1. Create the folder C:\appl\repast\demos\Template2
2. Download the latest JAR file from here and
save it into the C:\appl\repast\demos\Template2 folder
3. Open up a "Command Prompt" window
- Go to Start->Run
- Type "cmd" in the box and click "OK"
4. Change to the C:\appl\repast\demos\Template2 folder by typing this in the "Command Prompt" window:
cd \appl\repast\demos\Template2
5. UnJAR the Template2 file by typing this in the "Command Prompt" window:
jar xvf Template2-XXXXX-XXXX.jar
NOTE: Fill in the correct file name date/time stamp where the X's are,
e.g., Template2-040930-1750.jar for the 2004 Sept 30 version.
6. Then type this to run the demo:
ant run
How to download, install, and run the heatBugs2 demo
1. Create the folder C:\appl\repast\demos\heatBugs2
2. Download the latest JAR file from here and
save it into the C:\appl\repast\demos\heatBugs2 folder
3. Open up a "Command Prompt" window
- Go to Start->Run
- Type "cmd" in the box and click "OK"
4. Change to the C:\appl\repast\demos\heatBugs2 folder by typing this in the "Command Prompt" window:
cd \appl\repast\demos\heatBugs2
5. UnJAR the heatBugs2 file by typing this in the "Command Prompt" window:
jar xvf heatBugs2-XXXXX-XXXX.jar
NOTE: Fill in the correct file name date/time stamp where the X's are,
e.g. heatBugs2-040219-1731.jar for the 2004 Feb 19 version.
6. Then type this to run the demo:
ant run
Back to Repast at CSCS/UM pages