1. Installation

This document describes the procedure for downloading and installing GDA and its prerequisites, and validation the install. It is suggested that you follow all the steps herein before you move on to the next documents, which describe how to actually use GDA, and how to extend it for your site.

These instructions assume that you are going to install GDA on a Linux workstation. The details will almost certainly change in future releases, with the aim of simplifying configuration.

At this stage, we suggest that you use the exact version of the tools specified below.

1.1. Install Java

Install the Sun Java 1.6 JDK. Check that it is installed correctly as follows:

$ java –version

this should give something like java version “1.6.0_13”. And:

$ echo $JAVA_HOME

this is a directory name (without trailing slash), parent of bin, jre etc. If this environment variable is not set, then set it appropriately:

$ export $JAVA_HOME=/path/to/parent/folder

1.2. Install Eclipse

Download Eclipse from http://www.eclipse.org/downloads/packages/release/ganymede/sr2. Select the distribution called Eclipse for RCP/Plug-in Developers. Note that we require ‘’not’’ the latest version (3.5 “Galileo”), but rather version 3.4.2 (“Ganymede”).

Install in a suitable location, and point environment variable $ECLIPSE_REFERENCE to it:

$ export ECLIPSE_REFERENCE=/path/to/parent/folder

$ echo $ECLIPSE_REFERENCE

this is a directory name (without trailing slash), parent of dropins, features etc.

1.3. Tools that are _not_ required

Eclipse ships with versions of JUnit and ant included. The GDA distribution ships with versions of Jython (2.2.1) and ant-contrib (1.0b3) included. These versions will be used by the GDA build process. Likewise, this GDA distribution includes all 3rd party jars that are required. You do not need any tools or jars other that what is listed above.

1.4. Download and configure GDA

Go to ftp://ftpanon.diamond.ac.uk/GDA/ and download release_7.14.tar.gz.

Untar the download into a suitable location, which hereafter is referred to as $GDA_ROOT.

Edit $GDA_ROOT/plugins/uk.ac.gda.core/local.properties, and set the value of eclipse.reference to be the Eclipse install location (same as $ECLIPSE_REFERENCE)

1.5. Building GDA

Building GDA means compiling the Java code into .class files. The GDA distribution does not include these files, so you need to run a build before you can start using GDA.

1.6. Building the standard distribution

The command to build GDA is:

$ cd $GDA_ROOT/plugins/uk.ac.gda.core
$ ./build-classic.sh clean compile_test

This calls an ant script which deletes any previously-compiled code and the compiles the src and test code. You can omit the clean target for incremental compilation (only compile what changed). You should only need to run this build once. When you start adding to the GDA code, you will be building in another directory.

1.7. Building your own extensions

The commands to build you own extensions to GDA are:

$ cd $GDA_ROOT/config
$ ./build-classic.sh make-corba-jar

This builds the corba .jar. And:

$ cd $GDA_ROOT/plugins/uk.ac.gda.core
$ ./build-classic.sh clean_config compile_config

This calls an ant script which deletes any previously-compiled code and the compiles the src code. You can omit the clean_config target for incremental compilation (only compile what changed).

1.8. Starting GDA

Once you have built GDA, start the GDA servers (there are several, a Name Server, an Object Server etc), and then the GDA client. Although the servers and client would normally run on separate machines, the default configuration requires them on the same machine.

To start the servers:

$ cd $GDA_ROOT
$ ./config/bin/GDA_StartServers

Ignore most of the output(which may include text that looks like error messages), and wait for a message that looks something like:

2009-07-15 16:00:23,802 INFO gda.util.ObjectServer - Server
initialisation complete. xmlFile =
/scratch/gda_7.14_final_test/GDA_release_7.14/config/xml/object-creators-server.xml

To start the client:

$ cd $GDA_ROOT
$ ./config/bin/GDA_StartClient

On our beamlines, we have launchers (desktop icons) for this.

1.9. Stopping GDA

To stop the client, Exit from the File menu usually works!

To stop the servers:

$ cd $GDA_ROOT
$ ./config/bin/GDA_StartServers --stop