Create New Project:创建一个新的工程,Import Project导入一个已经存在的工程,Open 打开一个已经存在的工程,Get Form version Control 从git服务器上下载一个工程。
这里我们点击【Create New Project】创建一个新的工程。

设置Project SDK,选择【Maven】,勾选Create from archetype ,选择【maven-archetype-webapp】

在【Name】中输入项目名,【Location】选择要保存代码的本地磁盘,【GroupId】里设置好包名(一般为域名倒置),点击【Next】

因为我本地配置了maven,这里我选择我自己配置的maven
在【Maven home directory】选择你配置的maven根路径,在【local repository】选择本地maven仓库地址,【User setting file】选择配置的maven路径下的conf文件夹下的settings.xml文件,点击【finish】。


新创建的项目结构如下

在src/main/java上右键,选择【New】-》【Package】,输入包名后点回车



新建类:在上一步建的包上右键选择【New】=》【Java Class】,输入类名后敲回车。



第一个程序HelloWorld,在上一步建的类中敲入主方法:
public static void main(String args[]){
System.out.println(“Hello World!”);
}

在类上右键选择【Run ‘HelloWorld.main()’】运行HelloWorld

运行结果如下图则表示成功
