XMUT103: Using Java at Home

To do your COMP 102/103 Java programming on your own computer (Windows, Mac, or unix), you will need to
  1. Install a copy of Bluej (Version 5.2.1 is currently the latest) which should come with Java 17
  2. Install the ecs100 library
  3. Configure your PC correctly, particularly Bluej and the Java classpath
  4. Copy the Assignment files to your PC

The instructions below describe first what you need to do with a Windows computer, then what you need to do for a Mac. For Unix/Linux, you are on your own, but you may find tips/instructions on the BlueJ web pages.

Installing on a Windows computer

Step 1: Installing BlueJ and Java

You can download and install the 5.2.1 version of BlueJ that includes Java from https://www.bluej.org/download/files/BlueJ-windows-521.msi.

Note: If you download the "Standalone" version of BlueJ, then you can copy it to a USB stick and run BlueJ from the USB stick without installing it. This is less convenient, but more flexible. You still need the ecs100 library.


Step 2: Setting up the ecs100 library

To write and run the programs for this course, you will need the ecs100 library file, which contains essential resources for the programs. Note that you will need to use the library whether or not you are using BlueJ. Download the file ecs100.jar to your computer and then copy (or move) it to "C:\\Program Files\Bluej\lib\userlib\" directory. Right click on the link, and choose "save as". Note that the exact location of the Bluej directory will depend on the OS (e.g., Windows or MacOS) you are using.

Sometimes this doesn't work correctly. One cause is that when downloading ecs100.jar from the website using internet explorer, the file may be saved as ecs100.zip. If this is the case bluej will not load it. To fix, simply rename the file back to ecs100.jar.

You can also manually add the ecs100 class into Bluej if it's not doing so automatically:
  1. In BlueJ go to Tools --> Preferences.
  2. Click on the "Libraries" tab.
  3. Click on the "Add File" button and select ecs100.jar

Do you use a Surface Pro? (or another very high resolution screen). If the UI window is very small when you run your programs, then you may need to use an alternative version of the ecs100.jar library. Download this version, rename it to ecs100.jar and use it in place of the version below.

Installing on a Mac:

If you have "Apple Silicon M1 or M2" mac or macbook, then BlueJ requires Apple's Rosetta to run. Your mac may ask you to install Rosetta at some point if you haven't got it already; say "Yes".

Install Bluej. You can download the latest installer for MacOS X 10.11+ that includes JDK from https://www.bluej.org/download/files/BlueJ-mac-521.dmg. Drag the BlueJ app that is in the downloaded folder into your Applications folder.

To write and run the programs for this course, you will need the ecs100 library file, which contains essential resources for the programs. (You will need this whether or not you are using BlueJ.) Download the file ecs100.jar to your computer.

To install it into BlueJ,
  1. Open the Applications folder (where you would have installed BlueJ)
  2. Right click on the BlueJ icon and select "show package contents"
  3. Go to the Contents --> Resources --> Java --> userlib.
  4. Copy or move ecs100.jar from where you downloaded it into the userlib folder.
  5. If BlueJ is open, restart it.

You can check that BlueJ can access the file by opening preferences (inside BlueJ) and chosing the "Libraries" tab. The ecs100.jar file should be listed at the bottom of the window. If not, you can add it by clicking "add" and browsing to find the ecs100.jar file.