#Intellij not recognizing changes after hitting 'run' once.
1 messages · Page 1 of 1 (latest)
Please post your actual problem here, rather than redirecting people to an external site. It's also not really mobile friendly.
idk what happened but all the text I wrote out didn't get added to the post anyway, so I deleted it. I'll just write it all out here:
Basically, when I hit run in Intellij any changes in my code aren't recognized after the first run, upon first opening Intellij. So if I open Intellij and hit run, any runs after that initial one won't reflect any changes I made in my code.
Solutions I've tried:
- I have invalidated caches multiple times
- I deleted all class files
- I added "Build Project" as a new task in the Run/Debug Configuration
These are the only solutions that I have come across that pertain to my situation and they all failed, so I'm at a stand still at the moment.
Here are a few screenshots to better highlight the issue
This screenshot shows a number of print statements to display a simple menu in the console and a single conditional if the user hits 1 and then a print statement that will run which outputs test
This screenshot shows those same print statements all having been removed and then the console still showing the same output, as well as the same output when 1 is entered, instead of the new output which should be everything is deleted!
final screenshot just shows a number of errors, but the console showing the same output in the face of these errors
Did you make sure to save your file before re-running?
How do you re-run your code?
I hit save and then I hit run in the top right corner
I've run it like this since I've started using intellij
Could you share the run configuration?
hmmm. Could you just try to completely remove the Before launch things, i.e. the 1. Build and the 2. Build Project?
Also Java 11 is a little bit outdated, but that can't really be the issue here
removed them and switched to open-jdk 23 and still nothing
my last resort is I'm just going to uninstall and reinstall
if that doesn't work then back to vscode I go I guess
What I would try before uninstalling:
Open a new project and copy the source code there. If the problem doesn't persist it's just some weird setting you made in your current project and you probably won't ever face that issue again
you're absolutely right, I should've tried that first. I've already uninstalled though so I'll see if this fixes it
haha, good luck
so I started a new project and the run function works just fine so I'm assumig it's something with this project itself, just not sure what
it's as if it's not compiling after an initial compile or something
I cloned the project, and it's doing it again so it's something to do with something within the project itself. I have no idea what that could be tho lol
just gonna work on it in vscode
I like it more anyway
There's sometimes settings stored as a file check that
too late
don't care enough about intellij to spend another minute trying to figure this out
I really like it's debugging capabilities (i.e. how it visually displays everything)
so I've heard