I've got a project from my teacher, in which i should add my implementation for a certain aspect.
The Project already got a
the "run" and "debug"-button in the top run the currently selected
main-method. As long as you haven't selected one, you can't run it. In the current version on the left side of the editor-pane, there should be a green arrow right next to the
main-button. Run it once via clicking that arrow and from that point on you can run/debug the program using the buttons on the top-window.
In this image you can see the green arrows (version 2016.2.4).
Alternatively, you can use the following more complicated, but also more versatile option:
Directly from the run- and debug-buttons is a button that toggles a list. In the initial configuration of the project, this list contains exactly one Item: "Edit Configurations...". Use it to create a custom-target - go for Application, if your using a java-class as entry-point - and set up the configuration as you wish. Clicking the arrow mentioned earlier does basically the same with a bit of automatic configuration.
Open the context-menu on the
main-method. It as well contains options to run and debug the program with the marked method as entry-point. Works for the context-menu of the respective class as well.