KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sysprops > SysProps


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package sysprops;
5
6 import java.util.Arrays JavaDoc;
7
8 /**
9  * Little utility to dump the contents of virgin System properties
10  *
11  * @author teck
12  */

13 public class SysProps {
14
15   public static void main(String JavaDoc[] args) {
16     String JavaDoc[] props = (String JavaDoc[]) System.getProperties().keySet().toArray(new String JavaDoc[] {});
17
18     Arrays.sort(props);
19
20     for (int i = 0; i < props.length; i++) {
21       System.out.println(props[i] + " --> " + System.getProperty(props[i], "null"));
22     }
23   }
24 }
Popular Tags