title: How to know which jar to add for a specific java class, and how to add it in maven
body: <p>I guess I'm new to maven, </p>
  
  <p>Say I want to use a specific class which I found from the docs, (Or, as in this case, I had a <code>java.lang.NoClassDefFoundError</code>). For example <a href="http://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/class-use/StreamCapabilities.html" rel="nofollow noreferrer">"StreamCapabilities"</a></p>
  
  <p>How, from the javadoc, do I know which jar I need to add to my dependencies?
  I know the package is <code>org.apache.hadoop.fs</code>, but which jar contains this?</p>
  
  <p>Also, suppose I know which jar I need, how do I know what to write in maven <code>groupID</code> and <code>artifactID</code>?</p>