bluej-logo BlueJ
Search the BlueJ site

 
 
home
about BlueJ
download
documentation
extensions
help & Info
resources

BlueJ for AP* Computer Science

 

This page gives some hints about setting up BlueJ for the US Advanced Placement (AP) course.

Using the Marine Biology Case Study (MBCS) with BlueJ

After downloading and installing BlueJ, download the MBCS. Unzip the JavaMBS.zip file. Keep the zip file, so that you can restore the original version of the code later when needed.

You then have three choices: Download a prepared BlueJ-version ready-made for you (choice 1 or 2) or make some modifications yourself (choice 3). Choose either one. Choice 1 is recommended.

1: Getting a ready-made version with separate projects

This version contains the MBCS exercises as separate project - recommended.

  1. Delete the 'Code' folder inside the JavaMBS folder.
  2. Replace it with the BlueJ_Code folder downloaded from here

Read the README page for this package for more information.

Or 2: Getting a ready-made all-in-one-project version

This version maintains the same structure as the original (all files in one project), but runs in BlueJ.

  1. Delete the 'Code' folder inside the JavaMBS folder.
  2. Replace it with the Code folder downloaded from here

You can now open it normally in BlueJ (Use 'Project/Open...').

Or 3: Doing it yourself:

  1. In the JavaMBS/Code directory, create a new folder named "+libs" (without the quotes). Move the files mbsbb.jar and mbsgui.jar into this new folder.
  2. Rename the folder DynamicPopulation to +DynamicPopulation (that is: add a plus sign).
  3. Start BlueJ, and use 'Open Non-BlueJ...'. Select the 'Code' directory in 'JavaMBS' and open it. You have to do this only once. After this, use the standard 'Open...' function.
  4. Lay out the classes on screen. Here is a sceenshot of a possible layout.

That's it, you're ready to go!

 

Other possible BlueJ configuration

Other possible configurations suggested here are:

  • Using the documentation for the AP library subset
  • Using a local copy of the documentation
  • Changing the class templates

Using the documentation for the AP library subset

Owen Astrachan has published documentation of the AP library subset. You can make this documentation available from within BlueJ.

BlueJ already provides access to the standard Java API through the 'Java Class Libraries' function in the 'Help' menu. You have two options: You can replace this with the AP version, or you can add the AP version to the standard documentation (depending on what you'd like your students to see). I'll explain both.

Replacing the standard Java API with the AP version

  1. Open the Tools/Preferences dialog.
  2. Copy and paste the following URL into the 'JDK documentation URL' field:
    http://www.cs.duke.edu/csed/ap/subset/doc/

That's all. The 'Java Class Libraries' menu item will now open the AP subset documentation.

Adding the AP version to the standard API

If you want to add the AP documentation, but leave the standard documentation also in the menu, do the following:

  1. Open the bluej.defs file (see here for detailed instructions).
  2. In that file, search for the 'bluej.help.items' property.
  3. Add the following lines:
    bluej.help.items=APDoc
    bluej.help.APDoc.label=AP Java libraries
    bluej.help.APDoc.url=http://www.cs.duke.edu/csed/ap/subset/doc/

Now your help menu should include an entry for the AP libraries.

Using a local copy of the documentation

Both these suggestions use the online API over the internet. You can also install the AP documentation on your local disk, and then use the local copy. That way, it is faster, and you do not have to be connected to the network to use it. To do this, download the documentation (apapi.zip) from Owen Astrachan's web site and use a file URL to the local version instead of the http URL given above.

The easiest way to do this is to open the local copy of the documentation in your browser, and copy the URL out of the browser's address field.

See also Using a local copy of the Standard Java API.

Adding the MBCS documentation

The MBCS package that you download from the College Board site includes documentation that can be very useful. You can also add a link to this documentation to BlueJ's Help menu, just as you did with the AP docs above.

To do this, do the following:

  1. Open the bluej.defs file.
  2. In that file, search for the 'bluej.help.items' property.
  3. Add the following lines:
    bluej.help.items=MBCSDoc
    bluej.help.MBCSDoc.label=MBCS Documentation
    bluej.help.MBCSDoc.url=
    <URL for your local documentation>

To do this properly, you have to find and insert the correct URL for the documentation file. To do this, navigate to the directory where you saved the MBCS, find the file 'index.html', open it in your browser, and then copy the address out of the browser's URL field. Insert it at the right place in bluej.defs.

Now your help menu should include an entry for the case study documentation. (Thanks to Joe Kmoch for this tip.)

Changing the class templates

Most teachers have personal preferences how they want classes layed out, what should be included in class comments, etc. This can be greatly supported by custom class templates. The templates that BlueJ provides can be modified to suit your own style. Read Changing the default class template for instructions.

 

More Information

David Wittry has prepared a page with detailed BlueJ setup instructions, including setting up Karel J Robot and the MBCS with BlueJ, as well as other configuration.


* AP is a registered trademark of the US College Entrance Examination Board, which was not involved in the production of, and does not endorse, this web page.

 

 
 

Discussion Group

bluej-discuss

Announcements

For notificaton of new releases, subscribe to: BlueJ-announce

 
Bug Parade
View or submit bugs
maintained by
Michael Kölling
.
supported by Oracle logo