title: java.util.MissingResourceException: Can't find bundle for base name
body: <p>I'm testing Java's i18n features and have a problem, I can't load the language file when it's not in the class root. Right now my files are in the <code>/lang</code> directory.</p>
  <p>Looked several answers here in SO, putting it in a <code>classes</code> subdir and loading it like <code>lang.Messages</code>, used complete location routing <code>/Test/lang/Message</code> (test is the project name), using just <code>/lang/Message</code> and still I'm getting the:</p>
  <blockquote>
  <p><code>java.util.MissingResourceException: Can't find bundle for base name</code></p>
  </blockquote>
  <p>error.</p>
  <p>Anything else to try?</p>
  <p>My file structure is:</p>
  <blockquote>
  <p><code>Test/lang/Messages_es.properties</code></p>
  <p><code>Test/src/test/Main.java</code></p>
  </blockquote>
  <pre><code>import java.util.Locale;
  import java.util.ResourceBundle;
  import javax.swing.JFrame;
  
  public class Main {
  
       public static void main(String[] args) {
  
      Locale currentLocale;
      ResourceBundle messages;
  
      currentLocale = new Locale(&quot;es&quot;);
  
      messages = ResourceBundle.getBundle(&quot;Messages&quot;, currentLocale);
      System.out.println(messages.getString(&quot;Messagesgreetings&quot;));
      System.out.println(messages.getString(&quot;Messagesinquiry&quot;));
      System.out.println(messages.getString(&quot;Messagesfarewell&quot;));
      }
  }
  </code></pre>