To access the MapForce Server API from Java, a reference to MapForceServer.jar library must be added to the Java CLASSPATH. You can find the MapForceServer.jar file in the bin folder of the MapForce Server installation folder. You can either reference the file from its original location or copy it to another location if this fits your project setup.
If you are using Eclipse as Java development environment, you can add the required library reference to the CLASSPATH by editing the properties of the Java project, as shown below. Optionally, you can also attach documentation in JavaDoc format to the .jar library. You can find the JavaDoc in the bin folder of the MapForce Server installation folder; the instructions below illustrate how to make the JavaDoc documentation visible from Eclipse.
To add a reference to the MapForce Server library:
1.With the project open in Eclipse, on the Project menu, click Properties.
2.Click Java Build Path.
3.On the Libraries tab, click Add External JARs, and then browse for the MapForceServer.jar file located in the MapForce Server installation folder.
4.Optionally, to add the JavaDoc archive, expand the MapForceServer.jar record, and then double-click the Javadoc location: (None) record.
5.Ensure that the Javadoc in archive and External file options are selected, and then browse for the MapForceServer_JavaDoc.zip file located in the MapForce Server installation folder.
Below is an example of how the Eclipse .classpath file might look if you are referencing the files from the original installation folder, on a 64-bit Windows running 64-bit MapForce Server (the relevant lines are highlighted in yellow):
<?xml version="1.0" encoding="UTF-8"?>