title: Specifying .class files as resources and make them copied to output (bin) folder - Eclipse
body: <p>How to make eclipse treat a directory containing class files as a resource directory and make it copied to the output folder (bin) ?</p>
  
  <p>My project Structure is like this</p>
  
  <pre><code>src
    com
      package1
         all source files (.java)
         image files
      package2
         some dependent class files (.class)
  bin
    com
      package1
         generated .class files for source files
         image files
      package2
         (empty)
  </code></pre>
  
  <p>In eclipse I have specified exculsion filter to exclude the <code>src\com\package2</code> from source folder list. And I have added the absolute path to src folder in buildpath, so the classes in <code>src\com\package2</code> are available to build the source files.</p>
  
  <p>Now I want to export the whole set of classes (generated and referenced) into JAR file. For that I need to have the <code>src\com\package2</code> classes in <code>bin\com\package2</code> folder which is now empty. Is there any way I can make eclipse treat the class files in <code>src\com\package2</code> as resource files (like images in <code>src\com\package1</code>) and get them copied to <code>bin\com\package2</code>?</p>
  
  <p>PS: Runnable JAR is not an option as I have so many libraries referenced.</p>