Created
March 8, 2018 19:38
-
-
Save ouyi/27647dbdff8fe7691cb245b5e9e521c5 to your computer and use it in GitHub Desktop.
Print JVM options based on https://stackoverflow.com/a/1531999/8886552
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.management.ManagementFactory; | |
import java.lang.management.RuntimeMXBean; | |
import java.util.List; | |
public class PrintJvmOptions { | |
public static void main(String[] args) { | |
RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean(); | |
List<String> options = runtimeMxBean.getInputArguments(); | |
for(String o : options) { | |
System.out.println(o); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment