如何设置IntelliJ Idea来运行简单的java应用程序? [英] How to set IntelliJ Idea to run simple java application?

查看:723
本文介绍了如何设置IntelliJ Idea来运行简单的java应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

Hello world不在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:

推荐答案

右键单击 main 函数名称,然后选择Debug

Right click on the main function name and select Debug

绿色箭头只要运行当前的配置,当上面的右击创建这样的。您可以使用编辑配置按钮在左侧创建和自定义配置。

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.

这篇关于如何设置IntelliJ Idea来运行简单的java应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆