Properties p = System.getProperties();
// these 2 lines woul;d be nice -- but it's case-sensitive...
//Map sortedMap = new TreeMap(p);
//Set sortedSet = sortedMap.entrySet();
Set set = p.entrySet();
List list = new ArrayList(set);
Collections.sort(list, new Comparator()
{
public int compare(Object o1, Object o2)
{
Map.Entry me1 = (Map.Entry)o1;
Map.Entry me2 = (Map.Entry)o2;
return ((String)me1.getKey()).compareToIgnoreCase((String)me2.getKey());
}
});
return list;