KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > SysVars


1 public class SysVars
2 {
3     public static void main( String args[] )
4     {
5         java.util.Properties props = System.getProperties();
6         java.util.Enumeration enum = props.keys();
7         String key = "";
8
9         while( enum != null && enum.hasMoreElements() )
10         {
11             key = (String)enum.nextElement();
12             System.out.println( "name: " + key + ", value: " + System.getProperty( key ) );
13         }
14     }
15 }
16
Popular Tags