淘先锋技术网

首页 1 2 3 4 5 6 7
import java.util.Properties;
import java.util.Set;

public class Test
{
    //通过System.getProperties()获取系统参数
    public static void main(String[] args)
    {
        Properties sysProperties = System.getProperties();
        Set<Object> keys = sysProperties.keySet();
        
        for (Object key : keys)
        {
            System.out.print((String)key);
            System.out.print(":");
            System.out.println(sysProperties.getProperty((String)key));
        }
    }
    
}