This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help with I18N

 
Arthur Buliva
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

I have a problem when I try accessing a locale file from an absolute path.

I have this code:

It works well because I have the locale file as part of the packages of the application.

However,

brings out this problem:

Any help please?
 
Rob Spoor
Sheriff
Pie
Posts: 20608
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ResourceBundle.getBundle is using a resource name; it isn't called ResourceBundle for nothing. I believe that you can create a custom ClassLoader and use that to load the data:
Note: not tested.
 
Arthur Buliva
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rob. A little modification and all is OK

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic