Adrian Enciu
Adrian Enciu

Reputation: 133

Intellij IDEA doesn't detect file changes, therefore doesn't make before running

I'm having the following class:

public class MyClass {
  public static void main(String[] args) {
    System.out.println("abc");
  }
}

When I'm running the main method, "abc" is printed, as expected.

Then, after modifying "abc" with "def", I got "abc" printed instead of "def". I tried to manually trigger the Make button, but I got the same wrong result. Also, in the Event Log tab, the "All files are up-to-date" message is logged each time I try to run the method, even though I changed what to print.

If I right-click the file and choose "Compile MyClass.java", all works as expected.

I'm having this problem on my workstation (xubuntu 14.04), after I changed my hard drive to an SSD (if it matters). Other collegues with and without SSD don't have this problem, that's why I'm thinking it may be a wrong IDEA configuration.

Upvotes: 9

Views: 7800

Answers (5)

veritas
veritas

Reputation: 432

in my case, someone commented out spring-boot-dev-tools dependency from pom.xml

Upvotes: 0

Edward Ross
Edward Ross

Reputation: 2782

I solved this by deleting the folder ".idea". Note that this does remove all "Run/Debug Configurations" which will have to be setup again.

Upvotes: 2

Logs
Logs

Reputation: 155

Try deleting and rebuilding your artifact in your deployment configurations. That does the trick for me.

Upvotes: 0

Adrian Enciu
Adrian Enciu

Reputation: 133

I solved this problem by removing the Intellij IDEA 14.0.3 Community Edition installation and its configuration files from ~/.IdeaIC14, installing an older version (13.1.6) and then installing again 14.0.3 and using the configuration files from the older installation.

So my conclusion is that it might be an IDEA issue if you do a fresh install of 14.0.3.

Can someone else confirm this issue?

Upvotes: 1

sahitya
sahitya

Reputation: 5538

you can try invalidating the cache and restarting intellij, in many cases it will help.

File -> Invalidate Caches/Restart

Upvotes: 5

Related Questions