Programming with the Java API
In the aforementioned file names, the placeholder VerNum represents the version number of the release. In some cases, it includes a build number.
The AR System API Open Service Gateway Initiative (OSGI) bundle can be utilized in an OSGI deployment environment.
Writing the Java program
- Make sure that your programming environment is set up correctly as described in the Java API requirements section.
- Create a Java project in your Integrated Development Environment (IDE).
- Include the arapiVerNum.jar and the other required JAR files in the AR System API lib directory in the class path.
- Create a new class for the methods that call the Java API.
- Import the com.bmc.arsys.api package and other packages you might use in your program.
The API uses collection classes, so you might need java.util.ArrayList, java.util.List, and java.util.Map. - Instantiate an ARServerUser object and set the user name, password, server, and other connection attributes.
If the program must interact with different servers or as different users, it can create more than one ARServerUser object. - Use the ARServerUser.login() method to open the connection to the server.
- Perform the required operations by using the ARServerUser methods and other API objects and methods.
- Use the ARServerUser.(logout) method to close the connection to the server.
For AR System Java API troubleshooting information, see Troubleshooting-the-Java-API.
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*