Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Default JVM Settings

 
Ritesh Agrawal
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Does JAVA provide any command line utility to find out the default JVM settings for an installation. If yes, what is it? If no, is there any other way to find out the default JVM settings?

Thanks
 
Walter Bernstein
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which JVM settings do you mean?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the java.lang.System getProperties() method javadocs. This shows a long list of JVM related properties.

The getenv() method returns a Map of system environment properties as passed to the current JVM (if security settings allow) - if the settings you want are environment properties, look there.

Bill
 
Ritesh Agrawal
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I am refering to default JVM settings like the default minimum Heap Size/ default maximum heap size etc. allocated when the JVM is started.

java.lang.System getProperties() doesn't give the heap size.

I am interested to find out the default JVM parameters/settings used by an Java application when it is invoked by the java command. I understand that the default JVM settings can be overridden by providing command line options likes -Xms -Xmx etc. I am looking for a command line utility (if any) or any other means to find out the default values if no overriding options are provided.

Thanks..
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[Ritesh]: I am looking for a command line utility (if any) or any other means to find out the default values if no overriding options are provided.

I don't know of a programmatic solution - but have you tried looking in the documentation? Most of the default settings are described in the docs for the java command, or in pages linked from there.
[ December 26, 2007: Message edited by: Jim Yingst ]
 
Ritesh Agrawal
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jim. I got what I was looking for at the links provided by you.

Thanks again..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic