0

I have a java installed in C:\MyFolder\Test\bin\jvm and in the windows console I can successfully check the version by doing C:\MyFolder\Test\bin\jvm\bin\java.exe -version.

My question is, how can I check all the VM options set? For example I want to know the value of -Xms or if HeapDumpOnOutOfMemoryError is currently set to true or false.

Molly
  • 1,887
  • 3
  • 17
  • 34
Gordon
  • 85
  • 1
  • 11
  • Can you check https://stackoverflow.com/questions/5317152/getting-the-parameters-of-a-running-jvm – Thusitha Thilina Dayaratne Jun 12 '19 at 12:17
  • 1
    You set these VM options yourself on the command line. There is no global place where they are set, and the JVM itself does not remember such settings in a configuration file. – Jesper Jun 12 '19 at 12:17
  • @Jesper so what information does "java -XX:+PrintFlagsFinal" give? – Gordon Jun 12 '19 at 12:25
  • It prints a bunch of parameters that are set for that execution of the `java` command. If you really mean: "I want to know the current JVM settings from inside my running Java program", then see the answer that Thusita linked to above. – Jesper Jun 12 '19 at 12:52
  • aha I see,also how can I verify that the current JVM supports a paramter ? – Gordon Jun 12 '19 at 12:55
  • You may want to check this: https://chriswhocodes.com/hotspot_options_jdk8.html – Juraj Martinka Jul 01 '19 at 10:28

0 Answers0