Developing Java Applications: A Tutorial | Building a Simple Application

Creating a Project

The procedure for creating an Objective-C project is the same as the procedure for creating a Java project.

Launch Project Builder

Project Builder is the application typically used for creating and managing development projects. To launch Project Builder:

  1. Find ProjectBuilder.app in /System/Developer/Applications and select it.
  2. Double-click the icon in the File Viewer.

Choose the New Command

When Project Builder is launched, only its menus appear. To create a project, choose New from the Project menu. This action causes the New Project panel to appear.

Name the Project

All projects must have a name, a location in the file system, and a type designation. The New Project panel allows you to set all these things.

  1. Using the file-system browser, navigate to the directory where you want your project to be.

    One convention, as shown in the example, is to have a subdirectory in your home directory named Projects.

  2. Type the name of the project in the Name field. For the current project, type the name "TemperatureConverter."

    The name of the project becomes, by default, the name of the project directory and the resulting program.

  3. Make sure the project type, as displayed in the pop-up list, is Application.
  4. Click OK.

When you click OK, Project Builder creates and displays a project window. After it opens the window, it indexes the project.

Related Concepts

You might want to look in the project directory to see what kind of files it now contains. Among the project files are:

Makefiles
Three files contain build information related to the project. The Makefile file is maintained by Project Builder itself using the choices you make in inspector panels and elsewhere. Do not modify this file. You can however, customize the Makefile.preamble and Makefile.postamble files.
Templates
Templates for both Objective-C and Java souce code files.
English.lproj/
A directory containing resources localized to your preferred language. In this directory are nib files automatically created for the project.
TemperatureConverter_main.m
A file, generated for each project, that contains the entry-point code for the application in main() .

You'll also see a file named PB.project . This file contains information that defines the project (don't modify this file either). You can open the project for subsequent sessions by double-clicking this file.

Related Concepts

Previous | Next
© 1998 Apple Computer, Inc.