• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Default JVM Settings

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which JVM settings do you mean?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jim. I got what I was looking for at the links provided by you.

Thanks again..
 
A day job? In an office? My worst nightmare! Comfort me tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic