View Javadoc

1   import java.util.ArrayList;
2   import java.util.Collections;
3   import java.util.Iterator;
4   import java.util.List;
5   import java.util.Properties;
6   
7   public class TestBundle {
8   	public String toString() { return "This is a test"; }
9   	
10  	public static void main(String[] argv) {
11  		Properties p = System.getProperties();
12  		List keyList = new ArrayList(p.keySet());
13  		Collections.sort(keyList);
14  		Iterator keys = keyList.iterator();
15  		while (keys.hasNext()) {
16  			String key = (String)keys.next();
17  			System.out.println(key + "=" + p.getProperty(key));
18  		}
19  		
20  	}
21  }