取得参数的几中形式
java -DSTOP.PORT=8080 -DSTOP.KEY=secret -jar start.jar --stop
1、public static void main(String args) 2、int _port=Integer.getInteger("STOP.PORT",-1).intValue(); String _key=System.getProperty("STOP.KEY",null);
java -DSTOP.PORT=8080 -DSTOP.KEY=secret -jar start.jar --stop
1、public static void main(String args) 2、int _port=Integer.getInteger("STOP.PORT",-1).intValue(); String _key=System.getProperty("STOP.KEY",null);
暂无评论。
评论功能维护中,当前仅展示历史评论。