Thursday, August 23, 2012

OpenAM Java SDK debugging using eclipse

Finally OpenAM made some good documentation available to the developers, http://openam.forgerock.org/doc/dev-guide/index.html.  the document provides examples using OpenAM's Java SDK.  Ant scripts were provided for the build process, and batch files were provided running the examples.  Out of box, the build files, and batch files ran without any issues.

The first step in running the examples is to run scripts\setup.bat.  This is an interactive batch file, and collects basic information about the openam host name, port number, realm, userid,  password etc.  As soon as all relevant information is provided, setup.bat creates resources\AMConfig.properties which would be used while running the examples.


Copy resources\AMConfig.properties to the root of the Java source directory, and Eclipse's debugging features can be used to debug Java clients secured by OpenAM.