BlueJ Instructions Copying the Java Development Kit to drive D: on your computer: 1. Open My Computer, either from the icon or from the Start menu. 2. Go to drive G:, folder Shared, folder CATE. 3. Click on the folder labeled jdk1.5.0_04 and choose Copy from the Edit menu. 4. Go to drive D: and choose Paste from the Edit menu. This will open a dialog box and start the copying process; this may take a couple of minutes. 5. You can likewise copy the file bluejsetup.exe from g:\shared\cate to d:, or run the program from G:, as described below. Installing BlueJ 1. Go back to G:\Shared\CATE and find the file named bluejsetup.exe. 2. Double-click on the icon; at the first window, click Next. 3. The following window asks where you want to install BlueJ; type D:\BlueJ in the text area, then click Next. 4. On the next two windows (setup menu, icon) just click Next. 5. At the next window, click Install. 6. At the next (and final) window, unclick the ReadMe option and click the Launch BlueJ option, then click Finish. 7. You will probably see an error window that looks like the following:

8. Like the sign says, click the “Advanced” button. 9. Click “Browse for a specific Java version.” 10. In the dialog window that opens up, choose the D: drive, then the jdk1.5.0_04 folder, then the bin folder. 11. Click the little icon that says java, then click Open. 12. Your original dialog window should now look like this:

Computer Science I Fall 2005 Sheller Page 1

BlueJ Instructions - work 13. Click the single text line in the upper window of the dialog box, then click Launch BlueJ. Creating a Project 1. Choose Project – New Project from the menu. 2. You will need to determine where your project will be saved to. You should use your own media for this – either a floppy disk in drive A: or another portable medium, such as a flash stick or zip disk. You may save your work temporarily to drive D: on your lab computer, but CAUTION: you must erase any source code file you have saved on drive D: before you leave the lab! 3. Once you have chosen your location, type a name for your project (e.g. Lab1Part1). 4. The Project menu also contains the Open Project option, which you would choose to continue work on a project you started previously. Creating a Class 1. Once you have opened a project, you can create a new class by clicking the New Class button. 2. You will get a new window asking you to specify the type of class you want. The first choice, Class should already be selected; select it if it is not. 3. Type in a name for your class and click OK. Editing a Class 1. Double-click the class icon you just created. 2. You will see an editor window with a bunch of pre-written code. Highlight all of the text in the window from beginning to end, and hit the delete key. Your editor window should now be empty, and you are ready to begin typing. Compiling a Program 1. If you are in the Editor window, you can compile your program by clicking the Compile button. 2. If you are in the project window, you can compile your program by right-clicking you class box and choosing Compile from the resulting menu. Running a Program 1. Close the Editor window if it is open. 2. In the Project window, right-click your class box and select the text line that includes the word main. 3. You’ll see a box with two buttons, OK and Cancel. Click OK. 4. Your program will run in a separate window, which may be buried underneath the other open windows on your screen. Minimize the other windows so you can see your program run.

Computer Science I Fall 2005 Sheller Page 2

BlueJ Instructions - work