|

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.
- Delete the 'Code' folder inside the JavaMBS folder.
- 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.
- Delete the 'Code' folder inside the JavaMBS folder.
- 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:
- 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.
- Rename the folder DynamicPopulation to +DynamicPopulation
(that is: add a plus sign).
- 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.
- 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
- Open the Tools/Preferences dialog.
- 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:
- Open the bluej.defs file (see here
for detailed instructions).
- In that file, search for the 'bluej.help.items' property.
- 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:
- Open the bluej.defs file.
- In that file, search for the 'bluej.help.items' property.
- 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.
|