This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes which JVM is running? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "which JVM is running?" Watch "which JVM is running?" New topic
Author

which JVM is running?

yo nara
Ranch Hand

Joined: Apr 03, 2002
Posts: 35
suppose i have a java programm and i am running in two different jvms.how could i come to know from which jvm the program is running.
is there any method to identify the precise jvm
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
System.getProperty( "java.version" );


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Jonathan Roberts
Greenhorn

Joined: Aug 23, 2002
Posts: 4
System.out.println("Java Path = " + System.getProperty("java.library.path"));
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
See http://java.sun.com/docs/books/tutorial/essential/system/properties.html for a more complete list of available system properties.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
jQuery in Action, 2nd edition
 
subject: which JVM is running?
 
Similar Threads
Unable to take heap dump, when exceuting this command(jmap -heap:format=b <process id of jboss>)
Exception handling
Working of JAX-WS based web service
log4j time zone
how to run a remote Application