This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to find the running process by jar  RSS feed

 
Thirumurugan Sivaji
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • 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
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this post. It might be what you need...

http://www.coderanch.com/t/109334/Linux-UNIX/Get-UNIX-process-ID-java
 
Thirumurugan Sivaji
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • 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
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!