The problem with JConsole was tied to jps as well. This was especially problematic because I could always use JConsole to connect to a particular PID, but I wanted to use jps to help me find that PID. I blogged about the usefulness of jps in this blog entry.
I followed the instructions in the JMX - Cannot see local process list in JConsole of JDK 6. My first screen shot shows the results of running
jps
. Note that there is no PID shown even though at least jps
itself should be shown.
The next screen shot shows that JConsole cannot find any local instrumented Java applications even though it should, at the very least, find itself.

As the above screen shot (two above) demonstrates, I used the
echo %TMP%
command to determine what the TMP environment variable was set to. I navigated to that directory and went into the hsperfdata_Dustin folder (shown in the next screen shot).
I don't show it here, but I went into the Vista properties for the
hsperfdata_Dustin
directory and enabled permissions on that directory (they were ALL off). The next two screen shots demonstrate that JConsole and jps now worked for me again.

JConsole and jps weren't working simply because Vista wasn't letting me change files in that
%TMP%/hsperfdata_Dustin
directory. Once I opened up permissions on that directory, both jps
and jconsole
worked as expected.UPDATE (25 November 2008): The blog entry JMX Examples Don't Work Under Windows discusses how the characters used in the TMP environment variable can adversely affect the ability of JConsole to "see" managed applications.
3 comments:
Thanks, this is just what I was looking for today.
Paul,
I am glad this was useful for you. Thanks for letting me know if was helpful. I appreciate the feedback.
Dustin
Thanks a lot, this really helped me
Mario - Lima - Peru
Post a Comment