View this PageEdit this Page (locked)Attachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide

How do you set up the Marine Biology Case Study in DrJava?

Java loads classes as they are needed. For Java to find the classes in the Marine Biology Case Study you need to add two jar files to your classpaths. Jar files are archives (groups) of classes in a compressed form.

The classpath tells Java what directories to look in for classes and in what order. It will look in the first thing in the classpath first and then look in the next thing and so on until it finds the class, or has searched all the classpaths. So, be careful to not have two directories that have different versions of the classes in your classpath. If this happens remove one of them from the classpath.

Open DrJava and click on Edit and then Preferences
Uploaded Image: prefs.jpg

Click on the Add button after the Extra Classpaths textarea.
Uploaded Image: addClasspath.jpg

Add both mbsgui.jar and mbsbb.jar to your classpath. They are in the Code directory of the JavaMBS directory. You can select one and then shift and select the other or just select them one at a time.
Uploaded Image: selJars.jpg

This is what the preferences window will look like. Of course your path to the jars may be different than mine. Be sure to click on "Apply" and "Ok" to save the changes. If you have trouble after doing this close DrJava and
open it again.
Uploaded Image: mbsClasspath.jpg

Link to this Page