COMP112 2020 Tri 1: Using Java at Home

To do your COMP 102/112/103 Java programming on your own computer (Windows, Mac, or unix), you will need to
  1. Install a copy of the Oracle JDK 11 (Java Development Kit)
  2. Install a copy of Bluej (Version 4.2.2 is currently the latest)
  3. Install the ecs100 library
  4. Configure your PC correctly, particularly Bluej and the Java classpath
  5. 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, you are on your own, but see the bluej.org web pages!


Installing on a Windows computer (Windows 7 or newer):


Step 1: Installing BlueJ and JDK

You can download and install the 4.2.2 version of BlueJ that includes JDK from https://www.bluej.org/download/files/BlueJ-windows-422.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 would let you use BlueJ on the computers in university student computing labs. 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. (You will need this 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 location of the Bluej directory will be different if you have a mac or a unix computer).

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 have a Surface Pro? (or other 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:

Install Bluej. You can download the latest installer for MacOS X 10.11+ that includes JDK from http://www.bluej.org/download/files/BlueJ-mac-422n.zip.

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.

Transferring files between your home computer and your directory at VUW

Most of the files that we provide can be downloaded to your home computer from the course web pages (particularly the lecture and assignments pages).

If you want to transfer the files you have written, you may use a USB memory stick to carry the files between computers, or use a cloud drive such as google drive. You can also transfer files to/from home via the internet using an application that supports the scp secure copy protocol. WinSCP is good for Windows. See the Working From Home technical note page for more details.