title: java.lang.NoClassDefFoundError after building jar file in Intellij
body: <p>The structure of my first app is simple:</p>
  
  <pre><code>libs
    opencsv-3.8.jar
    yamlbeans-1.0.jar
  out
    artifacts
      ...
    production
      ...
  src
    META-INF
      MANIFEST.MF
    pl.krzysiu
      App.java
      CsvReplacer.java
  </code></pre>
  
  <p>Everything is fine during the compile and running the program. After building artifact jar file in the default out\artifacts directory, I get</p>
  
  <pre><code>java.lang.NoClassDefFoundError: net/sourceforge/yamlbeans/YamlException
  </code></pre>
  
  <p>when I try to run it by java -jar CsvReplacer.jar command</p>
  
  <p>The libraries are included inside the jar file (they are there after unpacking it) - they are added to <em>Libraries</em> section in <em>Project Structure</em> (separately - one file per one lib), the whole <em>libs</em> dir is included in the <em>Dependencies</em> tab of <em>Modules</em> section (with export checkbox checked) and the <em>libs</em> dir is added in <em>Output Layout</em> of <em>Artifacts</em> section similarily.</p>
  
  <p>The manifest file contains:</p>
  
  <pre><code>Manifest-Version: 1.0
  Class-Path: libs\yamlbeans-1.0.jar libs\opencsv-3.8.jar
  Main-Class: pl.krzysiu.App
  </code></pre>
  
  <p>Why the libs aren't visible for the App? If I copy this dir manually to the CsvReplacer.jar file's location - everything works fine.</p>
  
  <p>The structure inside CsvReplacer.jar file looks like:</p>
  
  <pre><code>libs
    opencsv-3.8.jar
    yamlbeans-1.0.jar
  META-INF
    MANIFEST.MF
  pl
    krzysiu
      App.java
      CsvReplacer.java
  </code></pre>
  
  <p>IDE: Intellij IDEA 2016.3</p>