DOS运行java程序

package cn.li.test;

public class Test{
	
	public static void main(String[] args){
		System.out.println("Test start...");
		String testId = System.getProperty("test.id");
		System.out.println(testId);
		System.out.println("Test end...");
	}

} 
[编译]javac -d . Test.java
[运行]java -Dtest.id=T00001 -Xms128M -Xmx256M -cp ./ cn.li.test.Test

猜你喜欢

转载自licjgege.iteye.com/blog/2227184