I am setting an external file to hold some persistent variables as Properties()
Is there an easy way to list these in the same way that
System.Properties()
does?? to produce a list of Properties I have set.
I am setting an external file to hold some persistent variables as Properties()
Is there an easy way to list these in the same way that
System.Properties()
does?? to produce a list of Properties I have set.
System.Properties() is just an instance of java.util.Properties.
Take a look at the docs: http://download.oracle.com/javase/6/docs/api/java/util/Properties.html
String list
for(Enumeration e = jr.keys();
e.hasMoreElements()
;){list = list + "\n" + e.nextElement()
}
return list.replace('null\n', '')
Is there a more Groovy way to do it??