title: How to get ResourceBundle from another Module in Java 9?
body: <p>I have two modules: module-a and module-b. Module-a has properties file (<code>com/foo/texts_en.properties</code>). Module-a exports <code>com.foo</code> package. In module-b I want to get this resource. For this I do the following in module-b:</p>
  
  <pre><code>Module moduleA = ClassFromModuleA.class.getModule();
  ResourceBundle resourceBundle = ResourceBundle.getBundle("com/foo/texts",
                  Locale.ENGLISH, moduleA.getClassLoader());
  System.out.println("TEST :" + resourceBundle.getString(key);
  </code></pre>
  
  <p>This is what I get:</p>
  
  <pre><code>Caused by: java.util.MissingResourceException: Can't find bundle for base name com/foo/texts, locale en
      at java.base/java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:2045)
      at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1679)
      at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1572)
      at java.base/java.util.ResourceBundle.getBundle(ResourceBundle.java:1273)
  </code></pre>
  
  <p>What is my mistake?</p>