Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ is running old class files

I am using Intellij for my project development(Java). 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 and now I am clueless what to do.

Any help would be appreciated. Thank you.

like image 737
Hemanth Annavarapu Avatar asked Jun 20 '17 18:06

Hemanth Annavarapu


1 Answers

I've had the same issue and I haven't been able to consistently make it go away, however, here's some things I've tried that could help:

  • delete .class files
  • invalidate caches and restart
  • check settings: sdk and source path imports of IDEA code might affect it
  • delete and reinstall intellij

Or do what I've ultimately done, which is to create a new project and avoid spending 5 hours tinkering with IntelliJ to get it to run my code properly.

like image 152
Rowan Avatar answered Sep 28 '22 11:09

Rowan