Compile all files in this directory with the javac command, if you have not done so already. For example, on the Solaris platform with the Korn shell, type:
$ cd examplesDir/SimpleClients/ $ javac -classpath classpath *.java
Because generic proxies do not need to be generated, this example does not need the proxygen tool. The GenericProxy class is available in the usual classpath for the product's runtime libraries.
If it is not already running on your host, start the base agent in a terminal window with the following command:
$ java -classpath classpath BaseAgent
The agent creates the RMI connector server to which the client application will establish a connection, and then it waits for management operations.
Wait for the agent to be completely initialized, then start the management application in another window on the same host:
$ java -classpath classpath ClientGenericProxy
Press Enter in the manager window to step through the example.
As seen in the code examples, the client application instantiates generic proxy objects to access both a standard and dynamic MBean that it creates in the base agent. The only difference between the two is the user-provided information available in the dynamic MBean's metadata.
Press Enter in both windows to exit the base agent and manager applications.