This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv 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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "which JVM is running?" Watch "which JVM is running?" New topic

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 could i come to know from which jvm the program is running.
is there any method to identify the precise jvm
Dirk Schreckmann

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

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

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

Joined: Jul 11, 2001
Posts: 14112
See 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
I agree. Here's the link:
subject: which JVM is running?
It's not a secret anymore!