Step 1> Create a standalone java program or web application program
Step 2>Stand Alone java program Example
A>
package com.jconsole.example;
public class ThreadProcess implements Runnable{
@Override
public void run() {
int count=0;
while(true){
System.out.println("Count method test by JConsole"+count++);
}
}
}
B>
package com.jconsole.example;
public class ThreadProcessDemo {
public static void main(String[] args) {
ThreadProcess tProcess=new ThreadProcess();
Thread t=new Thread(tProcess);
t.start();
System.out.println("Main Thread is running");
}
}
Step 3>
Run this Standalone java program
Step 4>
Goto jdk installation path.
like:
C:\Program Files\Java\jdk1.7.0_45\bin\
Step 5> Double Click or run jconsole.exe file
Step 6>open jconsole window
Step 7>click Connect
Step 8>If any firewall issue please ignore this.
Step 9>click insecure
Step 10>Exact Jconsole monitoring
Step 11>Thanks
Step 2>Stand Alone java program Example
A>
package com.jconsole.example;
public class ThreadProcess implements Runnable{
@Override
public void run() {
int count=0;
while(true){
System.out.println("Count method test by JConsole"+count++);
}
}
}
package com.jconsole.example;
public class ThreadProcessDemo {
public static void main(String[] args) {
ThreadProcess tProcess=new ThreadProcess();
Thread t=new Thread(tProcess);
t.start();
System.out.println("Main Thread is running");
}
}
Step 3>
Run this Standalone java program
Step 4>
Goto jdk installation path.
like:
C:\Program Files\Java\jdk1.7.0_45\bin\
Step 5> Double Click or run jconsole.exe file
Step 6>open jconsole window
Step 7>click Connect
Step 8>If any firewall issue please ignore this.
Step 9>click insecure
Step 10>Exact Jconsole monitoring
Step 11>Thanks
1 comments:
Click here for commentsVery informative Kartik. Thanks for sharing. Keep your good work.