6.1. Building and Starting the GDA Server and Client

This section should be read in conjunction with the GDA QuickStart Guide.

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.

6.1.1. Building the distribution

The GDA distribution includes, in addition to the base GDA, an example plugin, and an example configuration to run it. The GDA Developer Guide uses this to illustrate how to extend the GDA.

The command to build GDA is:

$ cd $GDA_WORKSPACE
$ python builder/gda-build.py --nowarn --product=example clean build

This results in the Java code in each plugin being compiled into the bin directory for the plugin (except for the uk.ac.gda.core plugin which is compiled into the classes directory). The GDA server runs using these .class files.

Additionally, a new directory called client is created, which holds the GDA client (an Eclipse RCP application).

6.1.2. Starting GDA

Once you have built GDA, start the GDA servers (there are several, a Name Server, an Event server, and an Object Server, etc), and then the GDA client. Although the servers and client would normally run on separate machines, the example configuration that comes with this release expects them on the same machine.

To start the servers:

$ cd $GDA_WORKSPACE
$ ./config/bin/gdaservers

You can add the --verbose if you wish. Ignore Motor Position File error messages, and wait for the Server initialisation complete message:

ERROR gda.device.motor.MotorBase - Motor Position File <path>/JT_RRMotor not found - setting JT_RRMotor position to zero and creating new file.
   ...
INFO  gda.util.ObjectServer - Server initialisation complete. xmlFile = <$GDA_WORKSPACE>/config/xml/object-creators-server.xml

To start the client:

$ cd $GDA_WORKSPACE
$ ./config/bin/gdaclient

Various configuration related errors can be ignored. Once the GUI has launched and you have logged in, switch to the “Scripting” perspective. The GDA Developer Guide has a number of commands that you can try out.

6.1.3. Stopping GDA

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

To stop the servers:

$ cd $GDA_WORKSPACE
$ ./config/bin/gdaservers --stop

On shutdown, errors such as Retries exceeded, couldn't reconnect to 127.0.0.1 can be ignored.