Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

which JVM is running?

 
yo nara
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
System.getProperty( "java.version" );
 
Jonathan Roberts
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
System.out.println("Java Path = " + System.getProperty("java.library.path"));
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See http://java.sun.com/docs/books/tutorial/essential/system/properties.html for a more complete list of available system properties.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic