Setting Up and Using BlueJ

CSE 142/143


Initial Set-Up

When you first start using BlueJ to develop your own classes, you should go through the following steps to set up a BlueJ project in which to work.  The initial set-up is different depending on whether you're working in the IPL or some other UW computer lab, or if you're working on your own machine.

Writing a Class

To define a new class:

After you've gotten your class to compile, you're now set to try using your class.  Congratulations!

Using a New Compiled Class

You can use BlueJ's own graphical methods to create instances of the classes you've written (right-click on the class box to see a list of constructors you can invoke, and select one) and then to send those instances messages (right-click on the instance box that appeared when you instantiated the class, and select a message to send).

More flexibly, you can use Jeva to create instances of your new classes and send them messages.  First, you need to put a copy of the right jeva-14x .bat file into your BlueJ project directory (e.g. A:\MyProject or C:\CSE\MyProject).  Here are some links you can download the .bat file from:  jeva-142.bat  OR  jeva-143.bat  (Unix and Mac users can download the corresponding .sh files from the Computing At Home web page).  If you're using your home machine, and you didn't put your uwcse .jar file into the C:\CSE\lib directory, then you should edit the .bat files you just downloaded and change the ABSLIB14x definition to be the directory where you installed your uwcse .jar file.

To run Jeva, double-click on jeva-14x .bat to start Jeva. (You don't need to quit BlueJ; you can run both BlueJ and Jeva at the same time.)  Then you should be able to evaluate Java expressions and statements, and you should also be able to create instances of your new BlueJ-produced classes and send messages to the instances.  If you want to make changes to your class, e.g. to fix a bug or add new methods or constructors, then do the following steps: