I need to run single java files independently in Intellij IDEA or vscode. Currently, when I run a single program both IDEs checks for other files.
For example, in the given image, I need to run ReversingString program only, but it doesn't run it and asks me to correct error in other java files.
How can I run a single file while ignoring other files. I checked answers to other similar questions here like editing run configuration but nothing is working.
I want all files in this folder to be independent/separate from each other.
Update: I found the solution :
All you need to do is to basically stop building the project.
For that click beside the run icon - "Edit/Run configurations" Click on modify option and check the option "Do not build before run" and now you can run a single file.