在jar包程序中设置返回值:
如:
java程序中运行java并获取返回值:
System.exit(1);
如:
if(hasException){System.exit(1);}else{System.exit(0);}
java程序中运行java并获取返回值:
Process p=Runtime.getRuntime().exec( "test.jar ");
int exitInt=p.exitValue();//程序返回的值.