Dreikäsehoch
Dreikäsehoch

Reputation: 131

What do green triangles in Intellij mean?

Why can't I run particular classes in Intellij? For instance, I have following classes in the same project, but I can't run all of them. How to fix that?

enter image description here

Upvotes: 0

Views: 792

Answers (2)

Marv
Marv

Reputation: 3557

These classes have methods with the signature public static void main(String[]), the entry point for a Java program. Classes that don't have a method with this signature will (with some exceptions, i.e. JavaFX' Application) not be shown as runnable by IntelliJ.

Upvotes: 2

GBlodgett
GBlodgett

Reputation: 12819

According to the documentation it denotes a:

Java class that contains declaration of the main() method.

If you want to run the program you will need to add a main()

enter image description here

Upvotes: 2

Related Questions