title: StringUtils not found in Eclipse (java.lang.NoClassDefFoundError), although referenced as a library
body: <p>I want to filtrate website content that I have stored in a <code>String</code> with <code>StringUtils</code>.
  Got some problems with the libraries.</p>
  <p><strong>Java-code:</strong></p>
  <pre><code>import java.io.*;
  import java.net.URL;
  import java.net.URLConnection;
  import org.apache.commons.lang3.*;
  
  public class URLConnectionReader {
      
      public static void main(String[] args) {
          
          String siteContent  = getUrlContents(&quot;https://www.tradegate.de/indizes.php?buchstabe=A&quot;);  
          
          System.out.println(siteContent);
          inputHandler(siteContent);
      }
      
      public static void inputHandler(String input) {
          
          String str = StringUtils.substringBetween(input, &quot;&lt;a id=&quot;, &quot;&lt;/a&gt;&quot;);
          System.out.println(str);    
      }
      
      private static String getUrlContents(String theUrl)  
        {  
          StringBuilder content = new StringBuilder();  
          
          try  
          {       
            URL url = new URL(theUrl); 
            URLConnection urlConnection = url.openConnection(); 
        
            BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));  
            String line;
          
            while ((line = bufferedReader.readLine()) != null)  
            {  
              content.append(line + &quot;\n&quot;);  
            }  
            bufferedReader.close();  
          }  
          catch(Exception e)  
          {  
            e.printStackTrace();  
          }  
          return content.toString();  
        }  
      }  
  </code></pre>
  <p><strong>The following steps were performed:</strong></p>
  <ol>
  <li>Downloading commons-lang3-3.12.0-bin.zip</li>
  <li>Unpacking and saving the JAR-files to the eclipse directory</li>
  <li>Add the external libraries to the JAVA build path and apply changes</li>
  <li>Deleting and reassigning, restarting ECLIPSE</li>
  <li>autobuild function = on</li>
  </ol>
  <p>Although it is referenced as an external library, this exception happens:</p>
  <pre><code>Exception in thread &quot;main&quot; java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
      at URLConnectionReader.inputHandler(URLConnectionReader.java:21)
      at URLConnectionReader.main(URLConnectionReader.java:16)
  Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils
      at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
      at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      ... 2 more
  </code></pre>
  <p><a href="https://i.stack.imgur.com/FjEiD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FjEiD.png" alt="enter image description here" /></a></p>
  <p>I searched some threads for troubleshooting, but i don´t get a clue at which point i made the mistake.</p>