You can download an Eclipse project that illustrates how to use the Alignment API via Java. The project contains two classes. The class UsageExample has a main method (~10 lines of code) that can be executed and another class called ProcessAlignment. Running the UsageExample will create an instance of such an a ProcessAlignment that is stored afterwards in a file. By using the Alignment API it will be guaranteed that your matcher creates the required output format correctly.
The Eclipse Project contains also the core of the Alignment API jar-files that are required to use the Alignment API. The path to the jars is already specified in the build path. Using the libraries in the Eclipse project does not force you to download and use the complete Alignment API.
>>> Link to the zipped Eclipse Project
For using the more functionaikity of the Alignment API, we refer to the reader to the Tutorials available here.