After changing my default project directory, when I try to run the main method, I have to manually add new configuration on Run/Debug tab on IntelliJ to actually run the main method. At first, I didn't think of it as an issue because that isn't really much of work, but it happens every time I create a new project.
Is there any way to solve the problem?
CodePudding user response:
Some things you can try:
Just run the application once using the play button in front of the class wrapping the
main
funtion. Usually in a file namedSomethingSomethingApplication.java
.Try File > Repair IDE. Then just follow the steps in the messages at the bottom right.
Close the project and delete all the
*.iml
and the.idea
folder. Then open the project using the.pom
instead of the project folder.
CodePudding user response:
All the times that we start a new project and configure Run/Debug, in general, all the conf files to run/debug project are in the ".idea" folder inside the root of your directory. So the solution is investigate the why the content of this folder is not persisting or changing. Maybe: Some broken conf content in ".idea" folder, try do delete this folder to force IntelliJIDEA create new one.