9
ICS 102: Using JCreator LE OR JCreator Pro Creating a New Project: Task Detailed Instructions Screenshots Start JCreator LE Start, Programs, JCreator, JCreator LE JCreator will load and the Start Page will be visible. Create a Project 1. Choose File, New, Project… in the menu. 2. The Project Wizard dialog will display several Project Templates. Click the Empty Project icon. 3. Click the Next button. Type a meaningful name and choose folder to store the project in The Project Wizard dialog will now prompt you for a project name. 4. In the Name: box, type the desired Project Name, such as Lab01 or HW5…. 5. If you have previously set a default folder location for your projects, the default location will already appear in the Location: box. If you did not previously set a default location, use the (Browse button) to navigate to the desired folder on the hard drive. 6. Source Path: and Output Path: should be the same as Location:. 7. The Create New Workspace

JCreator Instructions

Embed Size (px)

Citation preview

Page 1: JCreator Instructions

ICS 102: Using JCreator LE OR JCreator Pro

Creating a New Project:

Task Detailed Instructions ScreenshotsStart JCreator LE Start, Programs, JCreator,

JCreator LE

JCreator will load and the Start Page will be visible.

Create a Project 1. Choose File, New, Project… in the menu.

2. The Project Wizard dialog will display several Project Templates. Click the Empty Project icon.

3. Click the Next button.

Type a meaningful name and choose folder to store the project in

The Project Wizard dialog will now prompt you for a project name.4. In the Name: box, type the

desired Project Name, such as Lab01 or HW5….

5. If you have previously set a default folder location for your projects, the default location will already appear in the Location: box. If you did not previously set a default

location, use the (Browse button) to navigate to the desired folder on the hard drive.

6. Source Path: and Output Path: should be the same as Location:.

7. The Create New Workspace and Local Folder System radio buttons should be checked.

8. If this is the first time you are using JCreator LE, click the Next button. Otherwise, if you have verified the Java version and Compiler Tool previously,

Page 2: JCreator Instructions

you may just click the Finish button.

Verify Java Compiler version and location

The Project Wizard dialog will display current Java compiler version.9. Verify that you are using Java

5 (JDK version 1.5.xxx) and that ClassPath: indicates where you installed Java.

10. Click the Next button.Verify Java Tool to be used

The Project Wizard dialog will display current Java Tool.11. Verify that Select Tool

Type: is Compiler.12. Click Finish button.

Build Project Space

The Project Wizard will next display a Progress Bar that indicates it is building project space. 13. As soon as the Building

Project Space progress bar fills with green boxes, click the Finish button.

Add an empty Java Source file to project

The JCreator IDE should now display your Project name in the Package View at left.14. Choose File, New, File…

from the menu to add a source file to your project.

Choose Java File Type

With Java Classes highlighted in left column, highlight Empty Java File in right column.15. Click the Next button.

Source file name considerations

The File Wizard dialog will next prompt you for name and location of source file.In Java, the choice of source file name is important. The filename you assign to a source file will also be the Class name. So, your

2

Page 3: JCreator Instructions

source filename should:a. begin with a capital letter andb. be a meaningful name for

this Class.A meaningful name for a source file that will contain code to calculate the tip for a server might be TipAmount.

Assign file name to source file

16. Type a meaningful filename in the Name: box and verify that Location: is the folder location that you previously chose for your project.

17. Click the Finish button.

IDE is ready for you to type source code

You should now see the JCreator IDE with your source file inside your project.

At right is the Editor Window. You will notice a tab at the top of this window. The tab diplays the source file name (whatever you typed as the filename plus .java).

The Title bar of the JCreator displays your project name and the file name (surrounded by square brackets).

At bottom is the Output Window. Compiler errors and program output will display here.

Type your program

18. In the Editor Window, begin typing identifying comments (your name and assignment details) at the top.

19. Continue typing your programming statements, following the structure of Java program.

Save your work An asterisk next to the filename in the Filename tab of the Editor Window indicates that you have made changes to the file since you last saved.

3

Page 4: JCreator Instructions

20. With your cursor in Editor

Window, click (the Save All tool), or choose File, Save All from the menu, or choose File, Save Workspace from the menu.

Compile and link your program

21. Click the Compile tool, or Build, Compile Project from menu, or press F7. This will compile and link your Project in one step.

Fix errors, if necessary

22. If your compile was successful, you will see the “Process completed.” message.

Otherwise an Error List appears in the Task View at bottom. Double-clicking an error message will move your cursor to the left of a line of code. The error is often on this line or the previous line. Fix the error and compile again, by following instructions in step 21.

or

Run your program

23. When you have no errors, run your program by clicking the Run tool, choosing Build, Execute Project from the menu, or pressing F5.

Your program output displays at bottom

24. Your program output should display in the Output Window at bottom.

Check your output carefully for format and agreement with hand calculations. If necessary, revise your program and recompile as in step 21.

Print your code 25.With the cursor in the Editor

4

Page 5: JCreator Instructions

Window, choose File, Print from the menu.

Print your Program Output

26.With the cursor in the Output Window, choose File, Print from the menu.

Save work again 27. Following the instructions in step 20, save your work again before closing project.

Close this project but keep JCreator open

-or-

Close JCreator

28. Choose File, Close Workspace in the menu. You will return to the Start Page.

-or-

28. Choose File, Exit from the menu or click the in the upper right–hand corner of JCreator.

Displaying Javadoc documentation within JCreator

Display javadoc for a Class

1. With the cursor on a Class name in the Editor Window, choose Help, JDK Help from the menu or right-click and choose Show JDK Help.

2. javadoc documentation for this Java class will display in a separate tab in the Editor Window.

To reopen a project using JCreator:

Open an existing project via Start Page

1. Click the desired Project name in Recent Projects: list of the Start Page.

5

Page 6: JCreator Instructions

Open an existing project via My Computer

1. Choose File, Open Workspace in the menu. Browse to the desired Project folder. Double-click the filename.jcw file.

6

Page 7: JCreator Instructions

Some helpful settings for working with JCreator LE:

Task Detailed Instructions ScreenshotsSet default folder for projects

1. Choose Configure, Options, highlight Directories on the left.

2. Use the (Browse button) of the Default Project Directory to navigate to Your Lastname CIS202 folder on the hard drive.

3. Click the Apply button.Turn on line numbers in Editor Window

1. Choose Configure, Options, highlight the word Java under Editor on the left.

2. At right, check Show Line Numbers under Compatibility.

3. Click the Apply button.

Set font size or font style for Editor Window

1. Choose Configure, Options in the menu. Click the + in front of Java under Editor on the left.

2. Highlight Font under Java. 3. At right, choose the desired

font and font size.4. Make sure that the Screen

radio button is checked under Scope.

5. Click the Apply button.Set font size for printing source code

1. Choose Configure, Options in the menu. Click the + in front of Java under Editor on the left.

2. Highlight Font under Java. 3. At right, choose the desired

font and font size.4. Make sure that the Printer

radio button is checked under Scope.

5. Click the Apply button.

7