title: java.lang.NoClassDefFoundError: com/google/common/base/Joiner
body: <p>I'm hitting this error when run my package jar:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: com/google/common/base/Joiner
  </code></pre>
  
  <p>I simply call: java -jar xxx.jar</p>
  
  <p>I already added the dependency in my pom.xml:</p>
  
  <pre><code>&lt;dependency&gt;
    &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
    &lt;artifactId&gt;guava&lt;/artifactId&gt;
    &lt;version&gt;18.0&lt;/version&gt;
    &lt;scope&gt;compile&lt;/scope&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>I'm using IntelliJ editor. I have a unit test for the function which uses the Joiner class. It runs successfully from within IntelliJ.</p>
  
  <p>I put my cursor on the Joiner and use "command + B" to search for the declaration of the Joiner class. It opens the Decompiled source code page, and on the heading it shows the path as: guava-18.0.jar/com/goog/common/base/Joiner
  So everything looks correct.</p>
  
  <p>Can anyone help me figure out why do I hit this error?</p>