Reputation: 1955
I'm looking for a windows command line that would tell me at how much the memory settings have been set to start an application.
What is the default for Windows 7 JRE 1.6 if I do "java -jar my.jar" ?
thanks
Upvotes: 1
Views: 5319
Reputation:
You can use jinfo
(which is part of the JDK) to show the environment with which the JVM was started. If any non-standard settings were specified, it will also show them:
Attaching to process ID 2520, please wait... Debugger attached successfully. Client compiler detected. JVM version is 23.3-b01 Java System Properties: java.runtime.name = Java(TM) SE Runtime Environment java.vm.version = 23.3-b01 ... java.vm.specification.name = Java Virtual Machine Specification java.runtime.version = 1.7.0_07-b10 java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment os.arch = x86 java.vm.specification.vendor = Oracle Corporation ... java.specification.name = Java Platform API Specification java.class.version = 51.0 sun.management.compiler = HotSpot Client Compiler user.timezone = Europe/Berlin java.awt.printerjob = sun.awt.windows.WPrinterJob java.vm.info = mixed mode, sharing java.version = 1.7.0_07 ... VM Flags: -Xmx512m
Upvotes: 0
Reputation: 500883
If you're using Sun's JVM, -XX:+PrintFlagsFinal
will print out all JVM settings:
java -XX:+PrintFlagsFinal ...
The maximum heap size is shown as MaxHeapSize
:
uintx MaxHeapSize := 1073741824 {product}
The value is in bytes, so in the above example it's 1GB.
Upvotes: 4