title: ResourceBundle file not found, properties file not in jar
body: <p>About the resourcebundle errors, I've read other questions about the same subject, but I didn't get any wiser. Tried different things, doesn't help. To give a little background: I developed a small app (JDK6), that does some flat file parsing and editing automatically. The app starts by reading some data from a properties file.</p>
  
  <p><strong>Important</strong>: 
  I want to be able to change the properties file. I don't want to put it in the jar file.</p>
  
  <p>However, even with the little example app that I tried creating, based on another questions/answer [here][1]:</p>
  
  <pre><code>package restestapp;
  
  import java.util.Locale;
  import java.util.ResourceBundle;
  
  
  public class ResourceBundleTester
  {
      public static void main(String[] args)
      {
          Locale locale = Locale.getDefault();
          String basename ="myresource";
          ResourceBundle resourceBundle = ResourceBundle.getBundle(basename, locale);
          System.out.println(resourceBundle.getString("STARTING_MYAPP"));
      }
  }
  </code></pre>
  
  <p>Both files are here:</p>
  
  <pre><code>/home/dakoina/Documents/ResTestapp/ResTestApp.jar
  /home/dakoina/Documents/ResTestapp/myresource.properties
  </code></pre>
  
  <p>or even </p>
  
  <pre><code>c:/temp/ResTestApp.jar
  c:/temp/myresource.properties
  </code></pre>
  
  <p>But when I run it, it gives me this output:</p>
  
  <pre><code>dakoina@ubuntu:~/Documents/ResTestapp$ java -cp /home/dakoina/Documents/ResTestapp/ -jar "ResTestApp.jar"
  Exception in thread "main" java.util.MissingResourceException: Can't find bundle for base name myresource, locale en_US
      at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1539)
      at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1278)
      at java.util.ResourceBundle.getBundle(ResourceBundle.java:805)
      at restestapp.ResTestApp.main(ResTestApp.java:19)
  </code></pre>
  
  <p>and in Windows, the same...</p>
  
  <pre><code>c:\temp&gt;java -jar ResTestApp.jar
  Exception in thread "main" java.util.MissingResourceException: Can't find bundle
   for base name myresource, locale en_US
          at java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
          at java.util.ResourceBundle.getBundleImpl(Unknown Source)
          at java.util.ResourceBundle.getBundle(Unknown Source)
          at restestapp.ResTestApp.main(ResTestApp.java:19)
    [1]: http://stackoverflow.com/questions/3742158/using-resourcebundle-with-an-external-file-java
  </code></pre>
  
  <p>I can't see where I am wrong :/</p>