The main language used in this module is Java. You should use Java for all programming activities, the project, and exam answers.
The module doesn’t “teach” Java. We assume you already know Java basics. We expect you to learn on your own any Java constructs not covered in your previous modules. The exam expects you to know Java to the extent that you should be familiar with it as a result of using it in the module exercises/projects.
We require you to use Java 11 (the Oracle version or another alternative such as the OpenJDK version) for all module work. It is your duty to ensure the code you write (and executables you produce) are compatible with that version of Java. Any incompatibilities will be considered as bugs.
If you have Java 8 in your computer, we recommend removing it, to prevent using it unintentionally.
Why not move to Java 17?: Yes, we are aware that Java 17 is a more recent LTS version of Java. We hope to move to it soon, but not this semester.
[IMPORTANT] Advisory for Mac users
This advisory applies to some Mac users.
The problem: You might not be able to run the JAR files produced by some of the classmates due to various incompatibility issues between your environment and theirs, although you can still get your own JAR files to work in your computer.
How to find if it applies to you: If you are a Mac user, here are the steps to check if it applies to you:
- Download the latest
- Open a terminal and navigate to the location where you saved the above file.
- Check if you are using Java 11 by running the
- Launch the JAR using the
java -jar addressbook.jarcommand.
- If the text in the GUI appears garbled/unreadable, this advisory applies to you.
Solution: Some of our tutors looked into this problem and found a specific build of OpenJDK that doesn't seem to have these problems. If you are among the affected Mac users, please switch to that version of OpenJDK by following the instructions below.
Download and install the Azul build of OpenJDK 11 version found here (scroll to the bottom of the page) -- it supports fat JAR files compiled by all other systems that we have tested. Remember to choose the
JDK FXversion (not any other versions).
Recommended: Remove the other versions of OpenJDK so that you do not accidentally launch the JAR using the wrong version (this video shows how)
After installation, the command
java --version should give an output similar to the below:
openjdk 11.0.__ ____-__-__ LTS OpenJDK Runtime Environment Zulu11.__+__-CA (build 11.0.__+_-LTS) OpenJDK 64-Bit Server VM Zulu11.__+__-CA (build 11.0.__+_-LTS, mixed mode)
whereis java should output
Recommended: Set the
JDK_HOME system variables to point to
If you encounter problems while doing the above or need more info, please ask in the forum.