How to set IntelliJ Idea to run simple java application?

21,802

Solution 1

Right click on the main function name and select Debug

Creating configuration

The "green arrow" just runs the current configuration, when the above right clicking creates such. You can create and customize the configurations with the Edit Configurations button, to the left.

enter image description here

Solution 2

I found the reason - folder .IdeaIC was installed in my home directory that on network disk. After I have changed in properties ides.properties to use folder on local disk - all run well!

Solution 3

Have a look at debugging with Intelij, jetbrains.

Command 5 to open debug menu or view->tool windows->debug

Share:
21,802
user710818
Author by

user710818

Updated on May 12, 2020

Comments

  • user710818
    user710818 almost 4 years

    Possible Duplicate:
    Hello world doesn't run in IntelliJ Idea

    I am newbe for IntelliJ idea, so I try from HelloWorld:

     package test;
    
     /**
      * Created with IntelliJ IDEA.
      * Date: 16/06/12
      * Time: 12:13
      * To change this template use File | Settings | File Templates.
      */
     public class Main {
         public static void main(String ...args){
            System.out.println("Hello World");
         }
     }
    

    But this program doesn't run! Only green arrow getting grey, but I don't see any output. Which setting I should check? Thanks. Compiler: enter image description here