Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set IntelliJ Idea to run simple java application? [duplicate]

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

like image 370
user710818 Avatar asked Dec 05 '25 13:12

user710818


2 Answers

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

like image 188
Vic Avatar answered Dec 08 '25 03:12

Vic


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!

like image 32
user710818 Avatar answered Dec 08 '25 03:12

user710818



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!