COMP112 2019 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 8 (Java Development Kit)
  2. Install a copy of Bluej version 4.1.4. Use this version of Bluej, not the latest version.
  3. Install the ecs100 library and the template file
  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!


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


Step 1: Installing BlueJ and JDK

You can download and install the 4.1.4 version of BlueJ that includes JDK from https://www.bluej.org/download/files/BlueJ-windows-414.msi.

Note: If you download the "Standalone" version, 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 add and select ecs100.jar


Step 3: Setting up the template

Copy the file ecs100.tmpl to Program Files\Bluej\lib\english\templates\newclass\ecs100.tmpl (Just right click on the link, and choose "save as".) This will give you a template for creating new COMP102/112/103 classes in Bluej.

Installing on a Mac:

Install Bluej. You can download the latest installer for MacOS X 10.7.3+ that includes JDK from https://www.bluej.org/download/files/BlueJ-mac-414.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. In the Contents, open resources, then Java, then 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.

You may copy the file ecs100.tmpl into BlueJ, just as you did for ecs100.jar, except that you need to open resources, Selectclick, open Java, open english, open templates open newclass. This will give you a template for creating new comp102/112/103-style classes in Bluej.

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.