Solaris WBEM Developer's Guide

ProcedureHow to Set the Provider CLASSPATH

You set the provider CLASSPATH to tell the CIM Object Manager where the .class and .jar files are located.

Steps
  1. Create an instance of the Solaris_ProviderPath class.

    For example:

    /* Create a name space object initialized with root\system  
    (name of name space) on the local host. */
    CIMNameSpace cns = new CIMNameSpace("", "root\system"); 
    
    // Connect to the root\system name space as root. 
    cc = new CIMClient(cns, "root", "root_password");
    
    // Get the Solaris_ProviderPath class 
    cimclass = cc.getClass(new CIMObjectPath("Solaris_ProviderPath");
    
    // Create a new instance of Solaris_ProviderPath. 
    class ci = cimclass.newInstance();
  2. Set the pathurl property to the location of the files by using standard URL format.

    For example:

    /* Set the provider CLASSPATH to /myhome/myproviders */
    ci.setProperty("pathurl", new CIMValue(new String
                              ("file:///myhome/myproviders/"))); 

    The standard URL format is shown in the following table.

    Provider CLASSPATH

    Standard URL Format 

    Absolute path to directory 

    file:///a/b/c/

    Absolute path to .jar file

    file:///a/b/my.jar

  3. Create the instance.

    For example:

    // Pass the updated instance to the CIM Object Manager 
    cc.createInstance(new CIMObjectPath(), ci);