commondline 之二 执行类

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
上一篇:可执行jar包在windows server2008下的自启动


下一篇:python3 压缩文件及文件夹