title: Method getModule returning unnamed module for class in named module
body: <p>I just started to have a look at the Java 9 module system and I was wondering whether it is possible for a class to know in which module it is located.</p>
  
  <p>Therefor I created the following module
  </p>
  
  <pre><code>module de.test {
    exports de.test.myexport;
  }
  </code></pre>
  
  <p>and compiled a jar file that looks like</p>
  
  <pre><code>&gt; jar --print-module-descriptor --file=Java9Test-1.0-SNAPSHOT.jar                                
  
  de.test
    requires mandated java.base
    exports de.test.myexport
  </code></pre>
  
  <p>In package <code>de.test</code>, I have a class called <code>Overview</code> where I'm calling</p>
  
  <pre><code>Module module = Overview.class.getModule();
  </code></pre>
  
  <p>However, the returned module object is unnamed and has no <code>ModuleDescriptor</code>.</p>
  
  <p>Am I using <code>getModule()</code> correctly here, or is there any other way to load the module of a class? </p>
  
  <p>I'm using JDK 9 build 120 on OS X.</p>