You are on page 1of 7

ICS 102: Using JCreator LE OR

Creating a New Project: Task Start JCreator LE Detailed Instructions Start, Programs, JCreator, JCreator LE JCreator will load and the Start Page will be visible.

JCreator Pro

Screenshots

Create a Project

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

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. 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

Verify Java Compiler version and location

Verify Java Tool to be used

have verified the Java version and Compiler Tool previously, you may just click the Finish button. 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. The Project Wizard dialog will display current Java Tool. 11. Verify that Select Tool Type: is Compiler. 12. Click Finish button. 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. 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.

Build Project Space

Add an empty Java Source file to 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 2

Assign file name to source file

you assign to a source file will also be the Class name. So, your source filename should: a. begin with a capital letter and b. 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. 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. 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. 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. 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 3

IDE is ready for you to type source code

Type your program

Save your work

last saved. 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. 23. When you have no errors, run your program by clicking the Run tool, choosing Build, Execute Project from the menu, or pressing F5. 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. 4

or

Run your program

Your program output displays at bottom

Print your code Print your Program Output Save work again Close this project but keep JCreator open -orClose JCreator

25. With the cursor in the Editor Window, choose File, Print from the menu. 26. With the cursor in the Output Window, choose File, Print from the menu. 27. Following the instructions in step 20, save your work again before closing project. 28. Choose File, Close Workspace in the menu. You will return to the Start Page. -or28. Choose File, Exit from the menu or click the in the upper righthand 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.

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.

Some helpful settings for working with JCreator LE: Task Set default folder for projects Detailed Instructions 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. 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. 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. 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. Screenshots

Turn on line numbers in Editor Window

Set font size or font style for Editor Window

Set font size for printing source code

You might also like