• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get the JVM process name?

 
Vinney Shanmugam
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any API's available in java to get JVM name under which a java program is running?
getProcessName() sort of thing?
Please help me....
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
System.getProperty(String) might be what you are looking for ..

check http://mgrand.home.mindspring.com/java-system-properties.htm

for a list of property names
 
Vinney Shanmugam
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.
But, that list is not having what i wanted.

My question is how to get the java process name? when yous start any java program it runs as a process. I want to that process name? Also, is there ways to check JVM's running and how many?
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there is a discussion on that here
http://www.coderanch.com/t/109334/Linux-UNIX/Get-UNIX-process-ID-java
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic