user13
user13

Reputation: 391

Execute a simple java code in Intellij-Idea

Can you help me to run the code? I am trying to execute the following:

public class HelloWorld {
   public static void main (String[] args) {
    System.out.println("Hello,world!");
    }
}

To do that I click Run->Run (the second one with Alt+Shift+F10). It outputs a small window where the only available option is Edit configurations, I tried to do that but with no success.

Upvotes: 0

Views: 201

Answers (1)

shadowsheep
shadowsheep

Reputation: 15022

While editing your first configuration.

Clik + button and choose Application template

enter image description here

In Main class: type HelloWorld or pick it from the picker ...

Upvotes: 1

Related Questions