I am trying to use ResourceBundle#getStringArray to retrieve String[] from a properties file. The description of this method in the documentation reads:
Gets a string array for a given key from this resource package or one of its parents.
However, I tried to save the values โโin the properties file as several separate key / value pairs:
key=value1 key=value2 key=value3
and as a comma separated list:
key=value1,value2,value3
but none of them can be restored using ResourceBundle#getStringArray .
How do you represent a set of key / value pairs in a properties file so that they can be found using ResourceBundle#getStringArray ?
java resourcebundle
Grant Wagner Oct 22 '08 at 14:43 2008-10-22 14:43
source share