Solaris WBEM Developer's Guide

Running the Sample Client Programs

You must first set the CLASSPATH to include the necessary .jar files before you run the client programs.

ProcedureHow to Set the CLASSPATH

Step

    Set the CLASSPATH environment variable using one of the following methods:

    • To use the C shell, type:


      % setenv CLASSPATH .:/usr/sadm/lib/wbem.jar:/usr/sadm/lib/xml.jar
      :/usr/sadm/lib/wbem/sunwbem.jar:/usr/sadm/lib/wbem/extension
      
    • To use the Bourne shell, type:


      % setenv CLASSPATH .:/usr/sadm/lib/wbem.jar:/usr/sadm/lib/xml.jar
      :/usr/sadm/lib/wbem/sunwbem.jar:/usr/sadm/lib/wbem/extension
      

ProcedureHow to Run the Sample Client Programs

Most of the sample client programs accept an optional parameter that specifies the protocol to use to connect to the CIM Object Manager. RMI is the default protocol.

Step

    Run the sample client programs using the following format:


    % java program_name parameters
    

Example 3–1 Running a Sample Client Program

For instance, the following example runs the SystemInfo program by connecting to myhost as the root user with the secret password using the HTTP protocol.


% java SystemInfo myhost root secret http