XMUT103: Using Java at Home
Using Java at Home
To do your COMP 102/103 Java programming on your own computer (Windows, Mac, or unix), you will need to (see below for details)
- Install a copy of Bluej (Version 5.4.1 is currently the latest) which should come with Java 21.
- Install the
ecs100
library.
- Configure your PC correctly, particularly Bluej and the Java classpath.
- 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.4.1 version of BlueJ that includes Java from
https://www.bluej.org/download/files/BlueJ-windows-541.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 the browser may save the file as ecs100.zip. If this is the case BlueJ will not load it. To address this issue, 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:
- In BlueJ go to Tools --> Preferences.
- Click on the "Libraries" tab.
- Click on the "Add File" button and then first locate and then select the ecs100.jar file.
Do you use a Surface Pro (or another very high resolution screen) and find the UI window to be too small when you run your programs? In this case 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 standard version.
Installing on a Mac:
If you have "Apple Silicon M1 to M4" mac or macbook, download BlueJ for Apple Silicon
https://www.bluej.org/download/files/BlueJ-mac-aarch64-541.dmg
If you have an Intel Based mac or macbook, download BlueJ for Apple Intel.
https://www.bluej.org/download/files/BlueJ-mac-x64-541.dmg
Install Bluej. 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:
- Open the
Applications
folder (where you would have installed BlueJ).
- Right click on the BlueJ icon and select "show package contents".
- Go to the
Contents
--> Resources
--> Java
--> userlib
.
- Copy or move ecs100.jar from where you downloaded it into the
userlib
folder.
- 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.