0

I am using commadline java and javac on my Ubuntu Linux host and I was wondering how can I get the list and values of options being passed to JVM like -Xmx -Xms -Xss ?

Also I could not find this information on man java or man javac and I was very surprised with that. Can you help?

Ankur Agarwal
  • 23,692
  • 41
  • 137
  • 208
  • This answer is what you are looking for http://stackoverflow.com/questions/1490869/how-to-get-vm-arguments-from-inside-of-java-application – Brian Apr 17 '12 at 01:46

3 Answers3

1

I am assuming you are asking what are the possible command line options and their potential values.

This is the man page for the Solaris/Linux version of the JVM.

The general page for links to documentation of the OS-specific versions of all the tools is here.

QuantumMechanic
  • 13,795
  • 4
  • 45
  • 66
  • Also while my program is running how can I know what options JVM is operating with. Like what is the Heap Size or Stack Size my code started running with ? – Ankur Agarwal Apr 17 '12 at 01:37
1

If you need to access this information at runtime, you can use the JMX management beans, specifically RuntimeMXBean.getInputArguments. Additionally, many of the values are available from the relevant beans, e.g. the current heap memory.

jtahlborn
  • 52,909
  • 5
  • 76
  • 118
0

A quick look:
Javac options (it may be for 1.5 but it is still true for the latest JRE/JDK )
JRE default options in Linux/Solaris which was originally found in Java Hotspot VM options (see the section Categories of Java HotSpot VM Options ).

Hope this helps!

Kounavi
  • 1,090
  • 1
  • 12
  • 24