Solaris WBEM SDK 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.

How to Set the CLASSPATH
  1. Do one of the following:

    • Using 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
      
    • Using the Bourne shell, type:


      % set CLASSPATH=.:/usr/sadm/lib/wbem.jar:/usr/sadm/lib/xml.jar
      :/usr/sadm/lib/wbem/sunwbem.jar:/usr/sadm/lib/wbem/extension
      
How to Run the Sample Client Programs

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

  1. Run the sample client programs using the following format:


    % java program_name parameters
    

For example, the following 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