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.
- optional Apache Ant version 1.8 or greater.
Obtaining the Client¶
The AMPS Java client source code and pre-compiled JARs are available in
the installed AMPS instance. From the directory where AMPS is installed,
the Java client can be found in the api/client/java/
directory.
The pre-compiled JAR files are located in the api/client/java/dist/lib/ directory, which contains the following JAR files:
amps_client.jar
contains thecom.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 theamps_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.