• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Problem with reading resource bundle

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I created resource bundle file with content:
S aaaa
S bbbb
S cccc

When program opens rb and retrieves single key like
ResourceBundle rb=ResourceBundle.getBundle("mybundle");
...
String s=rb.getString("S");
rezult is "cccc"

If I try:
String[] s=rb.getStringArray("S");
I am getting an exception:
java.lang.ClassCastException: java.lang.String

should not result be ["aaaa","bbbb","cccc"] or I am missing something?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic