This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
    Bookmark Topic Watch Topic
  • New Topic

Can't find property file when using ResourceBundle.getBundle

 
Denis St-Amour
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,

I'm trying to figure out what components I need for Java Internationalization: Localization with ResourceBundles. When my application deploys (using Weblogic 10.3) and tries to locate the property file it returns the following error: java.util.MissingResourceException: Can't find bundle for base name Messages, locale en

I have my property files in the correct classpath WEB-INF/classes/Messages_en.properties and nothing seems to be wrong with my ResourceBundle.getBundle. Why can't it find the file? Is there something I forgot to include?


java.util.*;

Locale locale = new Locale("en");

ResourceBundle rb = ResourceBundle.getBundle("Messages", locale);

System.out.println(rb.getString("invalidUser"));




 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not ask the same question in more than one topic.
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic