To use the standard proxies for the product components, you must first compile them with the javac command and then place the classes you need in the classpath of your agent or management application. If you compile the proxy classes individually, be sure to compile the proxy's MBean interface before its corresponding proxy class.
Because of the package statement in proxy classes, use the following commands:
$ cd examplesDir/JdmkProxyMBeans/ $ javac -d packageRoot -classpath classpath *ProxyMBean.java *Proxy.java
In this command, the classpath must contain the current directory and the classpath of the Java DMK runtime libraries (jdmkrt.jar and jsnmpapi.jar). See “Directories and Classpath” in the Preface). The -d option of the javac compiler creates the necessary directories in the given packageRoot for each class's package. The packageRoot is usually the current directory (.) or you can specify a target directory in your application's classpath directly.