2. Installing the AMPS Client

Prerequisites

Before proceeding with this guide, make sure that the following programs are installed and functioning properly on your development machine:

  • Java Development Kit version 1.7 or greater
  • Java Runtime Environment version 1.7 or greater
  • Apache Ant version 1.8 or greater (optional)

Obtaining the Client

The AMPS Java client can be installed from the Maven Central Repository using com.crankuptheamps as the groupId and amps-client as the artifactId for the package coordinates.

The AMPS Java client source code and pre-compiled JARs are also available in the AMPS Java client distribution, which can be obtained from our website.

The pre-compiled JAR files are located in the dist/lib/ directory, which contains the following JAR files:

  • amps_client.jar contains the com.crankuptheamps.client package, which includes the classes necessary to build an AMPS client. This JAR and its contents will be discussed throughout this Developer Guide.
  • amps_client-sources.jar contains the source code files used to create the Java implementation of the AMPS client libraries. This file can be included in an IDE to assist in debugging. It can also be used to rebuild the AMPS client libraries if any custom changes are necessary. See Rebuilding the Client for instructions on how to recompile the AMPS Java client source.
  • amps_client-javadoc.jar, like the amps_client-sources.jar, can be included in an IDE to provide the javadoc annotations for the implemented classes and methods.

Test Connectivity to AMPS

Before writing programs using AMPS, make sure connectivity to an AMPS server from this computer is working. Launch a terminal window and change the directory to the AMPS directory in your AMPS installation, and use spark to test connectivity to your server, for example:

./bin/spark ping -type fix -server 192.168.1.2:9004

If you receive an error message, verify that your AMPS server is up and running, and work with your systems administrator to determine the cause of the connectivity issues. Without connectivity to AMPS, you will be unable to make the best use of this guide.