Connect JConsole to another user's process

1.5k Views Asked by At

I've got a Win64 C++ program that hosts a JVM. When executing normally, I can connect to it from JConsole and see the stats. The process appears in the list of local processes.

When the same program is running as another user (from a scheduled job with saved credentials), the process is not in the list. I've got admin rights on the machine, not sure if it matters.

2

There are 2 best solutions below

0
On BEST ANSWER

Find the PID of the process in Task Manager, then run

"PATH_TO_JDK_BIN\jconsole" PID
0
On

Java creates a hsperfdata_xxx directory in the TEMP directory. In it information of the processes running in the jvm are saved. Only when the jvm running jconsole uses the same directory as the java application you want to inspect they can see each other.
I assume the other user has a other TEMP directory and that's why your jconsole cannot see the other application.
I propose you set the same TEMP directory for both users.
I've had this problem with multiple java installations for one user.