title: Exception in thread "main" java.lang.NoClassDefFoundError: (IntelliJ idea)
body: <p>I'm getting the above error when I try to execute the following command.<br/></p>
  
  <pre><code>java -cp target/helloHBase-1.0-SNAPSHOT.jar HBaseIA.TwitBase.UsersTool add TheRealMT "Mark Twain" samuel@clemens.org abc123
  </code></pre>
  
  <p>I'm using IntelliJIdea IDE and all my maven '<code>clean</code>', '<code>install</code>' and '<code>package</code>' commands give "<strong><code>Build Success</code></strong>" message. <br/></p>
  
  <p>The directory structure of the project is provided below. I've already imported the hbase jar files to my project as external libraries in IntelliJ.</p>
  
  <p><a href="https://i.stack.imgur.com/2dc06.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2dc06.png" alt="enter image description here"></a></p>
  
  <p>Complete error:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/client/HTablePool
          at HBaseIA.TwitBase.UsersTool.main(UsersTool.java:22)
  Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.client.HTablePool
          at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
          ... 1 more
  </code></pre>
  
  <p><code>pom.xml</code> provided below.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;hbase&lt;/groupId&gt;
      &lt;artifactId&gt;helloHBase&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;dependencies&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.apache.hbase/hbase-client --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.hbase&lt;/groupId&gt;
              &lt;artifactId&gt;hbase-client&lt;/artifactId&gt;
              &lt;version&gt;1.1.2&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;  
  &lt;/project&gt;
  </code></pre>