Creating a New Project

The JDK and NetBeans are downloaded as installation wizards that set up the software on your system. You can install the software in any folder and menu group you like, but it’s best to stick with the default setup options unless you have a good reason to do otherwise.

When you run NetBeans for the first time after installation, you see a start page that displays links to news and programming tutorials (see Figure A.1). You can read these within the IDE using NetBeans’ built-in web browser.

Figure A.1. The NetBeans user interface.

Image

A NetBeans project consists of a set of related Java classes, files used by those classes, and Java class libraries. Each project has its own folder, which you can explore and modify outside of NetBeans using text editors and other programming tools.

To begin a new project, click the New Project button shown in Figure A.1 or choose the File, New Project menu command. The New Project Wizard opens, as shown in Figure A.2.

Figure A.2. The New Project Wizard.

Image

NetBeans can create several different types of Java projects, but during this book you can focus on just one: Java Application.

For your first project (and most of the projects in this book), choose the project type Java Application and click Next. The wizard asks you to choose a name and location for the project.

The Project Location text field identifies the root folder of the programming projects you create with NetBeans. On Windows, this is a subfolder of My Documents called NetBeansProjects. All projects you create are stored inside this folder, each in its own subfolder.

In the Project Name text field, enter Java24. The Create Main Class text box changes in response to the input, recommending java24.Java24 as the name of the main Java class in the project. Change this to Spartacus and click Finish, accepting all other defaults. NetBeans creates the project and its first class.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.103.154