Solaris プロバイダの CLASSPATH を設定するには、クライアント API を使用して Solaris_ProviderPath クラスを作成し、その pathurl プロパティをユーザーのプロバイダクラスファイルのロケーションに設定します。Solaris_ProviderPath クラスは ¥root¥system のネームスペースに保存されます。
プロバイダの CLASSPATH をユーザーのプロバイダの クラスファイルのロケーションに設定することができます。そのクラスパスを jar や、そのクラスを含むディレクトリに設定することができます。Java が CLASSPATH に使用する標準の URL フォーマットを使用してください。
|
プロバイダの CLASSPATH |
構文 |
|---|---|
|
ディレクトリへの絶対パス |
file:///a/b/c/ |
| CIM Object Manager を開始した位置からの (/)、ディレクトリへの相対パス |
file://a/b/c |
Solaris_ProviderPath クラスのインスタンスを作成します。たとえば、次のように実行します。
/* 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();
|
pathurl プロパティをユーザーのプロバイダクラスファイルのロケーションに設定します。たとえば、次のようにします。
...
/* Set the provider CLASSPATH to //com/mycomp/myproviders/.*/
ci.setProperty("pathurl", new CIMValue(new String("//com/mycomp/myproviders/"));
...
|
インスタンスを更新します。たとえば、次のようにします。
// Pass the updated instance to the CIM Object Manager cc.setInstance(new CIMObjectPath(), ci); |