Created
April 7, 2016 02:35
-
-
Save appleshan/4a0784de5fb34cc83b1b66d9a03a8042 to your computer and use it in GitHub Desktop.
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
package jdk.jvm; | |
import java.lang.management.ManagementFactory; | |
import java.util.List; | |
import org.apache.commons.lang.StringUtils; | |
/** | |
* 查询当前应用使用的JVM参数 | |
* | |
*/ | |
public class JvmParamerters { | |
public static void main(String[] args){ | |
List<String> paramters = ManagementFactory.getRuntimeMXBean().getInputArguments(); | |
System.out.println(StringUtils.join(paramters,":")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment