2012-06-16 18 views
2

可能重複:
Hello world doesn't run in IntelliJ Idea如何設置IntelliJ Idea以運行簡單的Java應用程序?

我newbe的IntelliJ的想法,所以我從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"); 
    } 
} 

但這個程序不運行!只有綠色箭頭變灰,但我沒有看到任何輸出。 我應該檢查哪種設置? 謝謝。 編譯器: enter image description here

回答

1

看看Intelij的調試,jetbrains

命令5打開調試菜單或視圖 - >工具Windows的>調試

+0

我不知道爲什麼 - 但調試已禁用。 – user710818

+0

你在什麼操作系統上?是安裝的Java運行時? – Hmm

+0

Windows XP,是的jdk1.6.0_26 – user710818

4

右擊main函數名稱並選擇Debug

Creating configuration

「綠色箭頭」 剛剛運行當前的配置,當上面的右擊創建這樣的。您可以使用左側的Edit Configurations按鈕創建和自定義配置。

enter image description here

+0

我認爲問題出在設置。 – user710818

2

我找到了原因 - 文件夾.IdeaIC安裝在我的主目錄上的網盤。 在屬性ides.properties中更改爲在本地磁盤上使用文件夾之後 - 所有運行良好!

相關問題