Configuring the Protector

Configuring and Verifying AP Java Installation on different platforms

Configuring AP Java on Linux

To configure the AP Java on the Linux platform:

  1. Setup the Java classpath.

    Operating SystemClasspath
    Linux/opt/protegrity/sdk/java/lib
  2. Before the trusted application can successfully load the ApplicationProtectorJava.jar file, ensure that -

    • The Java classpath is set accurately.
    • The path to jcorelite.plm is configured properly.
  3. Deploy a policy to test the application.

    For more information about deploying a policy, refer to Deploying Policies.

For more information about configuring the various parameters for the AP Java using the config.ini file, refer to Config.ini file for Application Protector.

Verifying Installation of AP Java

The steps to verify the successful installation of the AP Java are described in this section.

  1. Configure the application as a trusted application in the ESA.
    For more information about trusted applications, refer to Working With Trusted Applications.

  2. Initialize AP Java.
    For more information about the AP Java initialization API, refer to getProtector.

  3. Run the GetVersion method using the following command to check the version of the installed AP Java.

    public java.lang.String getVersion()
    

    The following is a sample code to check the version number of the installed AP Java.

    /* Illustrates how to call getVersion() api to know the version of Application Protector
    * Executing this for the first time creates a forensic entry that should be added to the authorized app
    *
    * Compiled as : javac -cp ApplicationProtectorJava.jar AP_Java_getVersion
    * Run as : java -cp ApplicationProtectorJava.jar AP_Java_getVersion
    */
     import com.protegrity.ap.java.*;
     public class GetVersion {
         public static void main(String[] args) throws ProtectorException {
    
         Protector protector=null;
         try {
         protector=Protector.getProtector();
         System.out.println("Product version : "+protector.getVersion());
         } catch (ProtectorException e) {
         e.printStackTrace();
         throw e;
             }
         }
     }
    

Last modified : January 19, 2026