---
title: "取得参数的几中形式"
author: "lylyb"
date: "2008-02-18T12:54:22Z"
tags: []
slug: "untitled"
draft: false
lastmod: "2008-02-18T12:54:22Z"
id: 162942
url: "https://lylyb.iteye.com/blog/162942"
---

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);