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);
}
}

About Bhabani 86 Articles
Bhabani has 10 plus years of experience in Data warehousing and Analytics projects that has span across multiple domains like Travel, Banking and Financial, Betting and Gaming Industries. Solution areas he focuses on designing the data warehouse and integrating it with cloud platforms like AWS or GCP. He is also a Elite level contributor at OTN forum more than 9 years. He loves to do experiment and POC on different integration tools and services. Some of his favorite skills are Redshift, Big Query, Python, Apache Airflow, Kafka, HDFS, Map Reduce ,HIVE, Habse, Sqoop, Drill, Impala.

Be the first to comment

Leave a Reply

Your email address will not be published.


*