title: "Duplicate class found" - IntelliJ and .class files
body: <p>I recently imported one of our company's project into IntelliJ Idea (10.5.1). We build and run the project using an <em>ant</em> build script and IntelliJ supports that just fine.</p>
  
  <p>However, IntelliJ seems to have a distinct problem when the compile output directory equals the source code directory, ie <code>.class</code> files are placed in the same directories as their corresponding <code>.java</code> sources.</p>
  
  <p>(Note that I am aware that is not a proper way to go, but tell my boss that. This project is over 15 years old and correspondingly large, too many things depend on it to be this way, there is nothing I can do about that.)</p>
  
  <p>So once things are compiled, IntelliJ detects the <code>.class</code> files and adds them to the project tree. The problem here is that it considers them class declarations, thus I get a "duplicate class found" message for each and every class. This doesn't make me unable to work, but it is extremely annoying as you may guess.</p>
  
  <p>I tried making the IDE ignore <code>.class</code> files, but apparently that makes it not load any classes at all, including the JRE runtime and anything else located inside of <code>.jar</code> files.</p>
  
  <p>Is there any way to make IntelliJ Idea ignore <code>.class</code> files which are in the same location as their <code>.java</code> sources?</p>