获取java程序的系统参数

2017/02/12 iteye

执行java程序时传入的系统参数可以通过以下方式在程序中获取: java  -D参数1=值1  java程序名     Properties props = new Properties(System.getProperties());     String outputMode = props.getProperty("参数1");

Search

    Table of Contents