Intellij compiler error - failed to copy from temporary location to output directory

intellij-idea

Solution

I got the exact error. I fixed this problem by Rebuilding the project.

Click on Build -> Rebuild Project..

This will resolve the problem. Thanks.

Problem

IntelliJ was working fine on my machine and suddenly it started to give me these errors when I compile "failed to copy from temporary location to output directory: path-of-the-temporary-compiled class-in-the-user-temp-directory" If I remove the module from the project and add it again and compile the file, it works fine for sometime and then starts giving this error. Tried cleaning up the user dir, shutdown and restart, etc. No luck IntelliJ IDEA 11.1.3 on Windows 7. Also on IntelliJ IDEA 12.0.1 on Windows 7.

Original source