Skip to content

Instantly share code, notes, and snippets.

@Frontear
Created December 8, 2022 22:08
Show Gist options
  • Save Frontear/5107471a33301c9abdc29700be324e4a to your computer and use it in GitHub Desktop.
Save Frontear/5107471a33301c9abdc29700be324e4a to your computer and use it in GitHub Desktop.
A command to find all the JVM flags for a respective JVM installation on a local system.
#!/bin/sh
# -version is just a filler command so that we can execute the process.
java -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+PrintFlagsFinal -version > flags.txt
@Frontear
Copy link
Author

Frontear commented Dec 8, 2022

To find out more about each flag, I highly encourage browsing the source for your JVM distribution (I use OpenJDK). https://github.com/openjdk/

@Frontear
Copy link
Author

Frontear commented Jan 1, 2023

Temurin builds: https://github.com/adoptium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment