Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get the Process ID of running Java Program  RSS feed

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to get the Process ID of running Java Program from using Java Code. hello_nandu@yahoo.com
[ February 11, 2003: Message edited by: Nandu Arni ]
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't, directly. The only possible way to do this would be to call

and parse the output to work out the JVM's pid. This will only work on Unix, of course.
 
I love a good mentalist. And so does this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!