To set the Solaris provider's CLASSPATH, use the client APIs to create an instance of the Solaris_ProviderPath class and set its pathurl property to the location of your provider class files. The Solaris_ProviderPath class is stored in the \root\system namespace.
You can also set the provider CLASSPATH to the location of your provider class files. You can set the class path to the jar file or to any directory that contains the classes. Use the standard URL format that Java uses for CLASSPATHs.
Provider CLASSPATH |
Syntax |
---|---|
Absolute path to directory |
file:///a/b/c/ |
Relative path to directory from which the CIM Object Manager was started (/). . |
file://a/b/c |
Create an instance of the Solaris_ProviderPath class. For example:
/* Create a namespace object initialized with root\system (name of namespace) on the local host. */ CIMNameSpace cns = new CIMNameSpace("", "root\system"); // Connect to the root\system namespace 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();
Set the pathurl property to the location of your provider class files. For example:
... /* Set the provider CLASSPATH to //com/mycomp/myproviders/.*/ ci.setProperty("pathurl", new CIMValue(new String("//com/mycomp/myproviders/")); ...
Update the instance. For example:
// Pass the updated instance to the CIM Object Manager cc.setInstance(new CIMObjectPath(), ci);