AEE Lab Over-The-Counter Market Experiment Installation Instructions
Both the server and client programs are written in Java and works
on Windows and Linux platforms.
You will need to have the following installed in order to run
- Java Runtime Environment 1.5 or higher
- Web browser with Java enabled
- Download the server program from here. Unpack the files to a directory on your computer. The
zipped file contains the server program "OTC_Server.jar"
and a number of sample text files.
- Create a new directory where
you will store all your output files. It is strongly recommended you
make a new one as all existing contents of this output directory
will be deleted each time you run an experiment.
- Double-click on
"OTC_Server.jar". If you have Java installed, this will open two windows: a Control
Panel (Figure 1) and an Experimental Results page (Figure 2). In
order to run an experiment, you will need to specify the
initialization file to use and the directory in which output
files will be saved.
Figure 1. Server Control Panel
Figure 2. Server Experimental Results Page
- Click on "Output Directory" in the Control Panel. Navigate
to the folder you just created and then click "Open". Alternatively,
you can right-click on the mouse and the option to create a new
folder will pop up.
- Click on "Load Init File". There are two sample files
included with the server program, named "SampleInit*_OTC_np.txt"
where n denotes the number of participants in the
experiment. For this example, choose "SampleInit1_OTC_8p.txt".
This sample file specifies the server to run using eight participants. It also has the auto-login feature enabled, so
that participants do not need to log-in their details at the
start of the experiment.
The server program will start and you will see the control panel change
to reflect the participant information (Figure 3).
Figure 3. Control Panel after loading
initialization file SampleInit1_OTC_8p.txt
- The server is now ready to accept connections from eight participant clients.
The client program will be accessed by client terminals using
HTTP. Thus, unlike the server program which can be installed and run
from anywhere on the server computer, the client program has to be
placed in a directory within the "htdocs" folder of your
Apache web server installation.
- Download the client program from here. This contains a web page named "OTC_client.html",
which calls Java to execute the corresponding client program
- Unpack the file and place it in the "htdocs" folder
within your Apache installation directory. For instance, if you
installed Apache 2.2.4 in
"C:\Program Files", you should place the client folder
Files\Apache Software Foundation\Apache2.2\htdocs\".
- Open a web browser in your client machine. It is recommended
you test that the server and client programs can communicate
with each other by running both programs on the same machine
first before using remote machines. This will eliminate all
other points of failure such as network problems and firewalls.
- On the web browser, type in the path to "OTC_client.html"
on the URL field. For instance, if you placed the folder "01cOTC_Client" in "C:\Program
Files\Apache Software Foundation\Apache2.2\htdocs\", you are running the client and server on the same
machine, and you want to run the version with no bid
the correct URL will be "http://localhost/01cOTC_Client/OTC_client.html".
Note that here localhost denotes the machine you want to
connect to, and everything that follows (/01cOTC_Client/OTC_client.html)
specifies the directory and filename of the web page you wish to
load and are therefore case-sensitive.
- If the server is running using the initialization file "SampleInit1_OTC_8p.txt",
the client web page will load the java program and the first
participant to connect will see
the trading screen in Figure 4. Auto-login
is enabled in the initialization file, so participants will not be
prompted to login but will instead be automatically assigned a
fictitious identity and will be taken directly to the trading
screen. Autologin can be disabled by commenting it out of the
Figure 4. Participant trading screen
As each participant logs in, the information on
the server's control panel will change to reflect their
Once all participants have logged in, the
experiment can begin by clicking the "Start" button on
the server's control panel.
- All participants must be logged in before the experiment can
commence. The "Start" button on the control panel will
not be accessible unless the expected number of participants for
this experiment has connected to the server.
- If you are in the middle of an experiment and a participant
gets disconnected, the experiment will automatically stop. You
will need to click "Rebuild Clients" on the serve's
control panel in order to re-initialize everything and start
- If you wish to run the clients on remote machines, you will
need to know the IP address of the server machine. You can find
this out by opening a command prompt (Windows "Start"
=> "Run" => Open "cmd") and typing ipconfig
on the terminal. Replace localhost with this IP address
in the URL field above to access the client program remotely
using your web browser.
- If autologin is disabled or you, you should see a login page
similar to the one below.
Last Modified: 17 October 2007