IntelliJ is running old class files

Answered

Hello

 

I am using Intellij for my project development. Strangely, whenever I try to run the project making some new changes to it, Intellij is always running old class files which were complied for a older version of my project. I tried recompiling, rebuilding, tried invalidate caches and restart, removed the project and opened it again but nothing seems to work. Not able to figure out the reason. I am now clueless what to do.

Any help would be appreciated. Thank you.

0
1 comment

Enable debug logging for build.log (https://intellij-support.jetbrains.com/hc/articles/207241085) and check the log to ensure that the .class files in the output directory are updated. Also see if the timestamp of the output classes changes.

It could be that there is a jar in the project classpath containing the old version of your classes and this jar is first in the classpath, overriding the output.

If the issue remains, please provide a sample project illustrating the problem and the exact steps to reproduce.

0

Please sign in to leave a comment.