Find Process ID in Windows using Java

Find Process ID in Windows using Java:

A small program to find the Process ID in windows operating system. This will vary for all execution.

import java.lang.management.ManagementFactory;

public class ApplicationPID {

public static void main(String [] args){
String name = ManagementFactory.getRuntimeMXBean().getName();
System.out.println("Process ID for this app = " + name);
}
}

0

About the author

Bhabani(http://dwteam.in) - Currently Bhabani is working as Sr Development Engineer at Harman International. He has good expertise on Oracle, Oracle Data Integrator, Pervasive Data Integrator, MSBI, Talend and Java. He is also contributing in ODI-OTN forum for last 5 years. He is from India. If you want to reach him then please visit contact us page. If you have any doubts or concerns on the above article, please put your question here. Dw Team will try to respond it as soon as possible. Also dont forget to provide your comments / suggestions / feedback for further improvement. Thanks for your time.

Similar Posts

Leave a reply

required*

Are you a human? *