This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get the JVM process name?  RSS feed

 
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
Boost this thread!