Skip to content

Instantly share code, notes, and snippets.

@appleshan
Created April 7, 2016 02:35
Show Gist options
  • Save appleshan/4a0784de5fb34cc83b1b66d9a03a8042 to your computer and use it in GitHub Desktop.
Save appleshan/4a0784de5fb34cc83b1b66d9a03a8042 to your computer and use it in GitHub Desktop.
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