CS211:
CodeWarrior Resources
What is CodeWarrior?
-
CodeWarrior 6.0 is CS100's officical integrated development
environment (IDE).
-
Company sites: Metrowerks
and CodeWarriorU.
How do I use CodeWarrior?
Guide to Using CodeWarrior: [HTML]
[PDF]
Guide to Using the CodeWarrior Debugger: [HTML]
[PDF]
How do I get scrollback in CodeWarrior output?
-
Run the program.
-
Click on the upper-left corner of the output window (looks
like a C:\ prompt).
-
Select Properties.
-
Click the Layout tab.
-
Under Screen Buffer Size change Height to 1000.
-
Click OK.
-
Click Save properties for future windows with same title.
-
Click OK.
How do I print an output window?
-
See Printing subsection in the Guide to Using CodeWarrior.
How do I redirect output to a text file?
-
Go to Edit->Java Application Release Settings->Linker->Java
Output.
-
Set OutPut type to Application and specify
Name.
For example, my_app for your EXE-file.
-
Compile the poject one more time.
-
Start the MS-Dos prompt and run the following command
from your project directory:
my_app.exe > my_output.txt.
-
All output of your program will be redirected to my_output.txt.
How do I use command-line arguments?
-
Select Java Application Settings > Target >
Java
Target.
-
Input the arguments in the VM Arguments box.
How do I use version control in CodeWarrior?
How do I use a class file in CodeWarrior?
-
Short version: Save the file to your computer, add it to
a project, and change the target setting.
-
Need more help? Here's the long version:
-
Find the file on the appropriate webpage.
-
Click on the hyperlink for the file.
-
Save the file to the desktop or a directory you can access.
- Your browser might show a Download Window.
If so, click on Save this file to disk.
- For convenience, save to a directory with easy access,
like the desktop.
- In Filename, write the file as something.class.
- In Save as type, select the All Files
option.
-
Open CodeWarrior and create a new project as a Java Stationary-->CUCS
Java Application project.
-
Add the file to the project by doing either of the following:
- click on the file with your mouse ONCE and drag into
either the Sources or Classes folders of the current project.
- select the menu sequence Project-->Add Files.
In the Add Files WINDOW, find the directory that contains your file
and select All Files in Files of type.
-
Open the Target Settings window and change the Java
Target to the name of the file without the .class portion.
-
Run the program by clicking on the right arrow ("play") icon.