It's very simple!! You need not setup anything for this. JPS and JConsole comes with JDK toolkit.
Step 1:
Got to command prompt and type 'jps' command. This will tell you the currently running java process id's.
Example:
C:\Users\kh1205>jps
7620 org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
7048 Main
5740 Jps
Step 2:
Open jconsole using your application process id, in my case 7048 is my eclipse application process id.
Example:
C:\Users\kh1205>jconsole 7048
Step 1:
Got to command prompt and type 'jps' command. This will tell you the currently running java process id's.
Example:
C:\Users\kh1205>jps
7620 org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
7048 Main
5740 Jps
Step 2:
Open jconsole using your application process id, in my case 7048 is my eclipse application process id.
Example:
C:\Users\kh1205>jconsole 7048
This will launch jconsole window with various sections.
Step 3:
Navigate to Threads section in jconsole window, and navigate through main thread(ex:main) and worker threads(ex: worker-1, worker-2). In one of these threads, your application is in waiting state.
No comments:
Post a Comment