title: Why Java fail to run class- error occurred during initialization of boot layer- Module mods not found
body: <p>I have gone through the <a href="http://openjdk.java.net/projects/jigsaw/quick-start" rel="noreferrer">java 9 jigsaw tutorial</a>. I have been struggling to run class, java throws below error-</p>
  
  <pre><code>java --module-path mods -m mods/com.test/com.test.HelloWorld
  Error occurred during initialization of boot layer
  java.lang.module.FindException: Module mods not found
  </code></pre>
  
  <p>Javac command-</p>
  
  <pre><code>javac -d mods --module-source-path src $(find src -name '*.java')
  </code></pre>
  
  <p>I am using mac, java version-</p>
  
  <pre><code>$ java -version
  java version "9"
  Java(TM) SE Runtime Environment (build 9+181)
  Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)
  </code></pre>
  
  <p>Am I missing anything?</p>