This documentation supports the 9.1 version of Remedy Action Request System.

To view the latest version, select the version from the Product version menu.

Programming with the Java API

Java API requirements

To build and run a BMC Remedy AR System Java API program on either Windows or UNIX, you need the following environment components:

  • J2SE Software Development Kit (SDK), version 8 (1.8.0_45) or higher
  • Java API files:
    • arapiVerNum.jar
    • arjniVerNum.dll/libarjniVerNum.a
    • arjniVerNum.dll/libarjniVerNum.sl
    • arjniVerNum.dll/libarjniVerNum.so
    • arsys_sample.xml
    • log4j.xml
    • log4j-1.2.14.jar
    • websvcjavaVerNum.jar

      Note

      If you are using the latest Java API, the arjni files are not required.

In these file names, the placeholder VerNum represents the version number of the release. In some cases, this includes a build number. For example, in release 7.6.02, the AR System API file is named arapi7602.jar or arapi7602_build001.jar.

In addition to the above mentioned arapiVerNum.jar file, the BMC Remedy AR System Java API file is also available as an OSGI bundle, with the file name as com.bmc.arsys.apiVerNum.jar. The BMC Remedy AR System API OSGI bundle can be utilized in an OSGI deployment environment.

Note

The BMC Remedy AR System Java API also uses a Java Native Interface (JNI) library and the C API library to connect to a pre-7.0.01 BMC Remedy AR System server. You can control when the JNI library is used by setting the jniLoadMode parameter in the Java API configuration file. See the comments in the sample file, arsys_sample.xml.

To write the Java program

Follow these steps to write the program:

  1. Ensure your programming environment is set up correctly as described in the Java API requirements section.
  2. Create a Java project in your IDE.
  3. Include the arapiVerNum.jar and the other required JAR files in the BMC Remedy AR System API lib directory in the class path.
  4. Create a new class for the methods that call the Java API.
  5. Import the com.bmc.arsys.api package and other packages you might use in your program. The API uses collection classes, so you are likely to need java.util.ArrayList, java.util.List, and java.util.Map.
  6. Instantiate an ARServerUser object. Set the user name, password, server, and other connection attributes. If the program needs to interact with different servers or as different users, it can create more than one ARServerUser object.
  7. Use the ARServerUserlogin method to open the connection to the server.
  8. Perform the required operations using the ARServerUser methods and other API objects and methods to create, retrieve, update, and delete BMC Remedy AR System system objects as needed and creating criteria objects and using server object methods as required.
  9. Use the ARServerUserlogout method to close the connection to the server.

For BMC Remedy AR System Java API troubleshooting information, see Troubleshooting the Java API.

Was this page helpful? Yes No Submitting... Thank you

Comments

  1. Teresa Barta

    Good morning,

     

    To write the Java program,  using API Remedy 9.1  arapi91_build001.jar

    Wich is the jdk recommended ? Is it still the 1.5.0_06 ?

     I have tried to compile the CreateEntry.jar to create a case with 1.7.0_99 and it say me that major version 52 It is recommended that the compiler be upgraded.

    To execute the jar with "java - jar CreateEntry.jar .....  "  this is the error : java.lang.UnsupportedClassVersionError: com/bmc/arsys/api/ARException : Unsupported major.minor version 52.0

    Version 52.0 in Java is 1.8

    Is this correct?

    you show the information based in arapi7602.jar  not in arapi91_build001.jar

     

    Thank you in advance

    Jul 26, 2017 06:32
    1. Anagha Deshpande

      Hello Teresa,

      I will check this with the SME and will write back to you.

      Regards,

      Anagha 

      Jul 26, 2017 10:26
  2. Teresa Barta

    Thanks

    Aug 03, 2017 07:16
    1. Anagha Deshpande

      Hello Teresa,

      Sorry for responding late.

      The correct version is J2SE Software Development Kit (SDK), version 8 (1.8.0_45) or higher. I have updated the topic.

      Regards,

      Anagha


      Sep 19, 2017 11:43