How to run a single java file instead of the whole project?
Answered
Hopefully someone here can help me. I only found very old posts about this issue, and neither of them were able to help me. I just updated to IntelliJ Idea 2020.2, and now every time I try to run a java file from any project, it will run all main() within the project, blocking me from running just one.
This was not happening before the update. Running the class using right click over the code or the green triangle shaped button beside the main method How can I fix this?
Thank you!
Please sign in to leave a comment.
May you show your program and generated run configuration? Like that: https://i.imgur.com/2sWRVkb.png
All seems to be correctly configured. May you show how IntelliJ IDEA starts the program? https://i.imgur.com/6dBBAWR.png
And if possible, please share a sample project where the issue could be reproduced. YOu can do it via GitHub, or our sharing website (https://uploads.jetbrains.com/)