• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

How to find the running process by jar

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have to do coding for the following scenario,

Suppose when 4 jar files are executed then 4 java.exe will present in task manager. How could I find that which java.exe is executing which jar file.

If anybody have an idea or code please let me know.

Thanks in advance
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check this post. It might be what you need...

https://coderanch.com/t/109334/Linux-UNIX/Get-UNIX-process-ID-java
 
Thirumurugan Sivaji
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Thanks for your input but it is not the one I wanted. I can get the list of processes and process IDs through Runtime.exec("tasklist"); command. My question is if there are more than one processes with same name(for eg if you open 2 command prompt the task manager will display 2 cmd.exe) how do I identify which process(like cmd.exe) will points to which task(like command prompt).

Thanks in advance
 
Quick! Before anybody notices! Cover it up with this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic