• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with reading resource bundle

 
Haris Karameh
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • 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?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!