Solaris WBEM Developer's Guide

ProcedureHow to Run the Sample Provider Programs

You must set up your environment before you can run the sample provider programs.

Steps
  1. Set the LD_LIBRARY_PATH environment variable to the location of the provider class files.

    • To use the C shell, type:


      % setenv LD_LIBRARY_PATH /usr/sadm/lib/wbem
      
    • To use the Bourne shell, type:


      % LD_LIBRARY_PATH = /usr/sadm/lib/wbem
      
  2. Copy the libnative.so shared library file to the directory specified by the LD_LIBRARY_PATH environment variable.


    % cp libnative.so /usr/sadm/lib/wbem
    
  3. Move the provider class files to the same path as the package to which those files belong.


    % mv *.class /usr/sadm/lib/wbem
    
  4. Become root superuser.

  5. Stop the CIM Object Manager in the same shell in which you set the LD_LIBRARY_PATH environment variable.


    # /etc/init.d/init.wbem stop
    

    Note –

    When you set the LD_LIBRARY_PATH environment variable in a shell, you must stop and restart the CIMOM in the same shell to recognize the new variable.


  6. Start the CIM Object Manager.


    # /etc/init.d/init.wbem start
    
  7. Exit being superuser.

  8. Compile the program's associated .mof file to load the appropriate class in the CIMOM and to identify the provider.


    % mofcomp -u root p root-password Native_Example.mof
    
  9. Start CIM Workshop.


    % /usr/sadm/bin/cimworkshop
    
  10. In the CIM Workshop toolbar, click the Find Class icon.

  11. In the Input dialog box, type the name of the class that you want to display and then click OK.

    The class displays in CIM Workshop.