1 package com.test;
2
3 import java.util.Properties;
4 import java.util.Map.Entry;
5
6 import org.junit.Test;
7
8 public class SystemTest {
9
10 /**
11 * 获取Java系统相关信息
12 * @throws Exception
13 */
14 @Test
15 public void testSys() throws Exception {
16 //System.out.println();
17 Properties properties = System.getProperties();
18
19 for(Entry<Object, Object> entry : properties.entrySet()){
20 System.out.println(entry.getKey()+"===>"+entry.getValue());
21 }
22 }
23 }