Program not updating after rebuild (changes not reflected at runtime)

已回答

Hi everyone,

I'm facing an issue in IntelliJ IDEA where my program doesn’t reflect code changes, even after performing Build → Rebuild Project, clearing caches, and restarting the IDE. Here’s everything I’ve tried so far and didn't work:

  • Rebuild project
  • Uninstalled and installed Intellij again.
  • Cleared caches and restarted (File → Invalidate Caches / Restart);
  • Made sure I’m running the correct run configuration;
  • Checked for duplicate classes or multiple versions of the same file in the classpath;
  • Verified that the updated .class files are actually being generated in the out/ directory.
  • Checked the Project SDK: File → Project Structure → Project, confirmed the correct JDK is selected.
  • Verified module dependencies: File → Project Structure → Modules → Dependencies, ensured each module uses the same SDK.
  • Checked the run configuration: top-right corner → Edit Configurations…, confirmed the JRE matches the project's SDK.

Despite all this, when I run the program, it still behaves as if the old version of the code is being executed. Has anyone encountered this issue before or have any ideas on what else I could check?

I always end up giving and simply creating a new project, but sooner or later the same thing always happens again. I am starting to believe it is something that I do wrong.

Thanks in advance.

0

Hi, Thiago!

Thank you for reaching out to us!

This behavior has been reported before, and identifying the root cause can be a bit tricky. However, some reports have shown that this can happen when a third-party plugin interferes with synchronization between the editor and the file system. Could you please try disabling all third-party plugins and check if the issue still occurs?

You can do this by going Settings | Plugins | Gear Icon | Disable All Downloaded Plugins.

If the issue still happens, could you please send us your application logs? You can do so by following these steps: 
1. Go to Help | Collect Logs and Diagnostic Data
2. Attach the file shown here; 
3. If the file is too big, please upload it here (make sure to share the UploadID so I can find on my end);

Let me know if you have any questions on the way.

0

请先登录再写评论。