标签:
E:\cn\zno\commandline\Test.class
package cn.zno.commandline; import java.lang.management.ManagementFactory; public class Test { public static void main(String[] args) { System.out.println("VM arguments:" + ManagementFactory.getRuntimeMXBean().getInputArguments()); System.out.println("Program arguments:"); for (String arg : args) { System.out.println(arg); } } }
java [-options] class [args...]
E:\>java -Xms32m -Xmx32m cn.zno.commandline.Test a b VM arguments:[-Xms32m, -Xmx32m] Program arguments: a b
标签:
原文地址:http://www.cnblogs.com/zno2/p/4570953.html