KB‎ > ‎

Jconsole no security manager exception

If your MBean exposes attributes which use application specific classes, then
you need to have these classes available on the client side.

There are two answers to this situation (well actually three).

1) If you use JDK 6, you could deploy MXBeans instead of deploying MBeans
see http://blogs.sun.com/roller/page/jmxetc?entry=writing_mxbeans_is_now_a

2) You can also start jconsole so that it finds your application classes in its
classpath. In that case you will need to start jconsole with the following

jconsole -J-Djava.class.path=<jconsole.jar>:<tools.jar>:<my-custom-classes.jar>

3) You could possibly use RMI annotations but:
1) you will have to run both client and server with a security manager and
the appropriate flag to turn on RMI codebase annotations
2) you will have to make your <my-custom-classes.jar> downloadable
at the appropriate location.
see http://java.sun.com/j2se/1.5.0/docs/guide/rmi/codebase.html
for more info.

Note: I'd recommend using method #1 or #2.