jQuery in Action, 3rd edition
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
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 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

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 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
I agree. Here's the link: http://aspose.com/file-tools
subject: which JVM is running?
It's not a secret anymore!