Create a custom Java administrative client program using WebSphere Application Server administrative Java APIs

This section describes how to develop a Java program using the WebSphere Application Server administrative APIs for accessing the WebSphere administrative system. For more information, view the JMX Javadoc .

 

  1. Develop an administrative client program.

  2. Build the administrative client program by compiling it with javac and providing the location of the necessary JAR files in the classpath argument. For example, if your installation directory is w:\DeploymentManager a typical command would look like the following example:

    javac -classpath 
    w:\DeploymentManager\lib\admin.jar;w:\DeploymentManager\lib\wsexception.jar;w:\DeploymentManager\lib\jmxc.jar 
    MyAdminClient.java
    

  3. Run the administrative client program by setting up the run-time environment so that the program can find all of the prerequisites. Many of the batch or script files in the bin directory under the installation root perform a similar function. An example of a batch file that runs an administrative client program named MyAdminClient follows:

    @echo off
    
    call "%~dp0setupCmdLine.bat"
    
    "%JAVA_HOME%\bin\java" "%CLIENTSAS%" "-Dwas.install.root=%WAS_HOME%" 
    "-Dwas.repository.root=%CONFIG_ROOT%" -Dcom.ibm.CORBA.BootstrapHost=%COMPUTERNAME% 
    -classpath "%WAS_CLASSPATH%;w:\DeploymentManager\classes;w:\DeploymentManager\lib\admin.jar;
    w:\DeploymentManager\lib\wasjmx.jar" MyAdminClient %*
    



 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.