External Java Libraries

Applies to ReadyAPI 3.51, last modified on February 16, 2024

Sometimes, the functionality of pre-installed libraries might prove to be insufficient for your needs. In this case, you can load an external Java library and use classes from it. You can write and compile a library yourself or use a third-party one.

Loading external libraries

To use an external Java library in ReadyAPI:

  1. Place your .jar to the <ReadyAPI>\bin\ext folder. The next time you start ReadyAPI, it will load the file as an external Java library that can be called from your scripts.

    Tip: If your external Java library references another Java library, put the latter in the <ReadyAPI>\bin\ext folder as well.

    If you address an external library in a virtual service that will be run in VirtServer, place the library in the <VirtServer>\bin\ext folder.

    If you address an external library in a load test that will be run on a LoadUI agent, place the library in the <LoadAgent>\bin\ext folder.

  2. Import the class to your script and call the method you need. Here is an example of using a simple class from the imported .jar file:


    import Sample // Import the Sample class

    Sample.add(1, 2) // Use the add method from the Sample class

See Also

Script Libraries

Highlight search results