Eclipse 简明教程

Eclipse - Create Java Project

Opening the New Java Project wizard

可以通过 New Java Project(新建 Java 项目)向导来创建新的 Java 项目。有多种打开此向导的方法:

The New Java Project wizard can be used to create a new java project. There are many ways to open this wizard −

  1. By clicking on the File menu and choosing New →Java Project.

  2. By right clicking anywhere in the Project Explorer and selecting New → Java Project.

  3. By clicking on the New button ( ) in the Tool bar and selecting Java Project.

Using the New Java Project wizard

New Java Project(新建 Java 项目)向导有两个页面。在第一页上:

The New Java Project Wizard has two pages. On the first page −

  1. Enter the Project Name

  2. Select the Java Runtime Environment (JRE) or leave it at the default

  3. Select the Project Layout which determines whether there would be a separate folder for the source codes and class files. The recommended option is to create separate folders for sources and class files.

new java project

您可以点击完成按钮来创建工程,也可以点击下一步按钮来更改 Java 构建设置。

You can click on the Finish button to create the project or click on the Next button to change the java build settings.

在第二页,您可以更改 Java Build Settings ,如设置工程依赖项(如果有多个工程)和向构建路径添加额外的 jar 文件。

On the second page you can change the Java Build Settings like setting the Project dependency (if there are multiple projects) and adding additional jar files to the build path.

Viewing the Newly Created Project

软件包浏览器显示新创建的 Java 工程。表示工程的图标带有 J 装饰,表示该工程是一个 Java 工程。文件夹图标带有装饰,表示该文件夹是一个 Java 源文件夹。

The package explorer shows the newly created Java project. The icon that represents a Project is decorated with a J to show that it is a Java Project. The folder icon is decorated to show that it is a java source folder.

new java project pe