title: Loading with ResourceBundle from inside a jar
body: <p>I have seen some answers concerning how to load a particular file within a jar through <strong>getResourceAsStream</strong>, and I can manage this.
  However I am facing something really specific an I could not find an answer about this on the forum.</p>
  <p>Here is the configuration:</p>
  <p>I have a jar file having a <strong>conf</strong> directory that contains 2 properties files <strong>messages_en_US.properties</strong> and <strong>messages_fr_FR.properties</strong>. The classical way to load such resources is to use</p>
  <pre><code>ResourceBundle.getBundle(&quot;messages&quot;, java.util.Locale.getDefault());
  </code></pre>
  <p>If the files were on disk, in a directory referenced by the program classpath, this works fine. But I don't know how I can manage combining use of <strong>ResourceBundle.getBundle</strong> and use of resources from within a jar.
  Indeed, as I cannot see any bridge through <strong>getResourceAsStream</strong> (or this would imply managing locale by myself to specify the entire resource file name, which is not very smart).</p>