title: Why did Java 9 introduce the JMOD file format?
body: <p>Java 9 has three ways to package compiled code in files:</p>
  
  <ul>
  <li>JAR</li>
  <li>JMOD</li>
  <li>JIMAGE </li>
  </ul>
  
  <p>JIMAGE is optimized for speed and space and used by the JVM at runtime so it makes sense why JIMAGE was introduced. JIMAGE files are not supposed to be published to maven repos or used at compile or link time. </p>
  
  <p>The docs claim that JMOD can store native code and other things that can't be stored by JAR files and that developers can make and distribute their own JMOD files. The JDK ships with <code>jmods/</code> directory containing all the modules of the JDK for users to depend on. </p>
  
  <p><strong>Questions:</strong> </p>
  
  <ul>
  <li>Why did Java 9 introduce the JMOD file format?</li>
  <li>Should a library author distribute a JMOD file or a JAR file or both? </li>
  <li>Should jmod files be published to maven repos? </li>
  </ul>