Is it possible to pass credentials for monitored resource to JConsole while starting it via command line. I\'ve got the command like that right now.
${jdk.ho
It is not possible with JConsole. The alternative JMX console that enables you to pass username/password from command line is jmxterm.
It can be found here: http://wiki.cyclopsgroup.org/jmxterm
As far as I know, you can't. From your example though it looks like you are only trying to connect locally to a JMX process. In that case you could simply disable authentication in the JMX process (and make sure it listens for JMX only over localhost). Then you don't need to pass credentials and it will work with jconsole. For a true remote connection though (in which you will definitely want authentication, among other things like encryption), I think you have to try out one of the many other jmx type clients.
I don't think there is a command line access option to do this. It's a sensible approach since it would reveal credentials in the process signature which might be visible to others.
However, you can specify a password file using the system property com.sun.management.jmxremote.password.file.
These options are documented here.