This site is from a past semester! The current version will be here when the new semester starts.

TextbooksStandards/Conventions


Programming Language

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.

Preparation:

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:

  1. Download the latest addressbook.jar from here.
  2. Open a terminal and navigate to the location where you saved the above file.
  3. Check if you are using Java 11 by running the java -version command.
  4. Launch the JAR using the java -jar addressbook.jar command.
  5. 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 the following output:

openjdk 11.0.12 2021-07-20 LTS
OpenJDK Runtime Environment Zulu11.50+19-CA (build 11.0.12+7-LTS)
OpenJDK 64-Bit Server VM Zulu11.50+19-CA (build 11.0.12+7-LTS, mixed mode)

And whereis java should output /usr/bin/java

Recommended: Set the JAVA_HOME/JDK_HOME system variables to point to /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home

If you encounter problems while doing the above or need more info, please ask in the forum.



TextbooksStandards/Conventions