• Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception in thread "main" MissingResourceException:  RSS feed

 
Veshnu Ramakrishnan
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i wrote a class like this and placed a resource file named a.properties in the same folder but i am getting a java.util.MissingResourceException. can anyone help me in this.

import java.util.ResourceBundle;

public class ResourceBundleTest {
public static void main(String as[]) {
ResourceBundle resource = ResourceBundle.getBundle("a.properties");
}
}
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the Javadoc for the getBundle() method on this page. The argument to getBundle() is not a filename; it's the "base name" of the bundle, which in your case, is "a". If the file is named "a.properties", and you say "getBundle("a")", this will work. But please read the Javadoc -- there's a lot of important information there.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!