Installing BlueJ (and the JDK) on a PC

Installing the JDK

  1. Access the CD-ROM that came with your textbook by placing it in your PC's CD drive and opening the CD.
  2. Open the JDK5 folder. There are several interesting documents in this folder, including a README file. You might want to check these out at some point. (If you are on a Vista-powered PC, you should use JDK6.) For now, though, we're just interested in...
  3. Running the application "j2sdk-1_5_0_09-windows-i586.exe" by double-clicking on it. This will pop up a window that says something about "extracting files", etc.
  4. After a while, you will be asked a series of questions. You can accept the default answers, but make sure you note the directory under which you are installing SDK. (I think the default is something like "C:/j2sdk1.5" or something like that.)
  5. After much whirring and clanking from the CD and your hard drive the installation should finish. (You will click on the "Finish" button. At your discretion you can choose, here, to read the associated README file by clicking on the corresponding "check box".)

Installing the BlueJ IDE

  1. Use your web browser (Firefox or Internet Explorer) to access http://www.bluej.org/download/download.html.
  2. Follow the directions to download the latest version of BlueJ. (As of this writing, it is version 2.2.0.) Note the directory in which you save the downloaded .exe file. You may--but probably won't--need this when you get to "step 3" of BlueJ.org's instructions.
  3. To test your installation, go ahead and run BlueJ. Use the Project menu to open one of the sample projects from the Example directory, located in the directory at which you installed BlueJ. Compile the file there, and run it, as we discussed in class.

Installing the JDK Documentation

If you'd like, you can install the on-line Java documentation associated with JDK. (The documentation is written in HTML, allowing you can read it from a browser.) The instructions for doing this can be found at http://java.sun.com/javase/downloads/index_jdk5.jsp (look for the "J2SE 5.0 Documentation" header.) You may need a compression/decompression utility, such as winzip. You can download it for free onto your PC, if you don't already have such a thing.

  1. When asked where to extract the documentation to, select the same directory where you placed the JDK ("C:/j2sdk1.5", or whatever it was). This will create a subdirectory, "docs", within your JDK directory.
  2. To access the JDK documentation, use the Help menu from within BlueJ. Select "Java Class Libraries". Now, by default, this will only work if you are on-line, because BlueJ tries to access the on-line documentation provided by the Sun Corporation, which supports Java. As you have just downloaded the documentation onto your own PC, you want to set up BlueJ so that it simply accesses your on-board documentation, instead of browsing the Web. To do that....
  3. In BlueJ, select the BlueJ menu, and then Preferences (or the Project menu, and then Preferences, depending on the version.) This will bring up a dialog box. Select the "Miscellaneous" tab.
  4. At the top of the page you will see "JDK documentation URL" adjacent to a text box. The text box will have "http://..../api/index.html" there. Replace the "http://..../" with the directory where you downloaded your documentation. This will be something like "C:/j2sdk1.5/docs", yielding a complete file name something like: "C:/j2sdk1.5/docs/api/index.html".
  5. Okay, now to test everything, start or restart BlueJ, and select the "Java Class Libraries" entry from the Help menu (in the upper right-hand corner of BlueJ). This should open a browser window showing the table of contents of the JDK's documentation.