5.9 Running the Base Agent Example
The examplesDir/current/BaseAgent/ directory contains the source file of the BaseAgent application.
To Run the Base Agent Example
Compile the BaseAgent.java file in this directory
with the javac command. For example, on the Solaris platform, type:
$ cd examplesDir/current/BaseAgent/
$ javac -classpath classpath *.java
|
Again, we do not need the MBean classes at compile time, but they will
be needed at runtime, because we do not use a dynamic class loader. You will
need to have compiled the standard and dynamic MBean classes as described
in 1.3 Running the Standard MBean Example and 2.3 Running the Dynamic MBean Example. If you want
to load any other class in the base agent, you must include its directory
or JAR file in the classpath.
To run the example, update your classpath to find the MBeans and start
the agent class: $ java -classpath classpath:../StandardMBean:../DynamicMBean BaseAgent
|
5.9.1 Agent Output
This agent displays output for the MBean created.
When the connection MBeans have been created, it is possible to connect
to the agent through the HTML adaptor.
When you have finished, press Enter to remove all
MBeans from the agent and exit the agent application.
|