next up previous
Next: Working With Projects, e.g. Up: Guide to CodeWarrior Java Previous: Printing

Creating New Projects

For some programming assignments you will receive pre-built project and source code files. But if no files are supplied, or if you want to run additional programs for practice, you will need to know how to create your own projects.

To create a new project from scratch, start CodeWarrior and select File|New.... In the window that appears, select Java Stationery as the kind of project to create, and give the project file a name and choose where to put it. Type a name ending in .mcp for the project. To change where to save the new project, click Set; note that if you have not already selected a project name, you will be asked to do so in the resulting dialog box. Finally --after selecting Java Stationery as the kind of project, supplying a project name, and choosing where to save the new project-- click OK.

In the next window that appears, select the appropriate project stationery. The different project stationery choices specify appropriate options, libraries, and sample code files needed to create different kinds of programs. CodeWarrior comes with several project stationery choices. In the CIT labs, we have added a few extra choices to create simple Java programs for Computer Science classes. (See the end of this handout for information about adding them to your copy of CodeWarrior.)

If you are creating a simple Java program that does text input and output, select CUCSJavaApplication. If you want to generate graphical output, select CUCSJavaGraphicsApplication. Click OK. If a window pops up warning you that various project elements have ``...been updated to the latest version'', ignore it (you may close the window).

This creates a new folder in the location you selected earlier. The folder contains the new project file, copies of other files included with the stationery, and a folder containing data used by CodeWarrior for its internal bookkeeping. Once the files and folders are created, CodeWarrior will open the new project file.

IMPORTANT: When you save a new file or folder, always check that you are saving it where you want it. The default folder initially displayed in the dialog box is usually somewhere in the folders containing CodeWarrior itself, which is almost certainly not where you want to store your project.


next up previous
Next: Working With Projects, e.g. Up: Guide to CodeWarrior Java Previous: Printing
CS 100 Course
2000-01-20