title: java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils
body: <p>I'm using IntelliJ and I am trying to use the FileUtils.copyFile() method. When I use that method I get this error:</p>
  
  <pre><code>    Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apach
  e/commons/io/FileUtils
  </code></pre>
  
  <p>Here is the code that uses the copy file method:</p>
  
  <pre><code>import org.apache.commons.io.FileUtils;
  ...
      try {
           File destJAR = new File("c:/X-Dock/MP3Player.jar");
           File playerJAR = new File(MP3Player); //"MP3Player" is a string that is defined earlier.
           FileUtils.copyFile(playerJAR, destJAR);
      }catch (IOException e){
           e.printStackTrace();
      }
  </code></pre>
  
  <p>I imported the Apache Commons JAR "commons-io-2.4" into the IntelliJ project by going to </p>
  
  <pre><code>File -&gt; Project Structure -&gt; Libraries -&gt; Add -&gt; Java -&gt; "commons-io-2.4.jar"
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>