Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Properties: getting multiple keys

807589Jul 15 2008 — edited Jul 15 2008
Hi all,

Suppose I have following properties file:
this.is.a.property.key.1=value1
this.is.a.property.key.2=value2
this.is.a.property.key.3=value3
this.is.a.property.key.4=value4
this.is.a.property.key.5=value5
this.is.another.key.1=anothervalue1
How can I easily get (one method call?) all properties with the name "this.is.a.property.key" without looking at their suffix?
So, as a result I should have 5 values in an array or list.
Is this possible within Java SE? Or maybe via a library (Commons)?

Thx,
Wim.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 12 2008
Added on Jul 15 2008
3 comments
282 views