Chapter 00: Tool Setup

Chapter 00: Tool Setup

September 30, 2025 | Next part |

This chapter details the setup process for installing Java and Visual Studio Code on your system. It’s a suggested way of doing things, although there are many different ways to do this.

Software

The required software for this course is Visual Studio Code (a free code editor built by Microsoft) and the Java Development Kit (programming language and runtime).

You’ll also use these tools, which you don’t need to install:

  • OneDrive
  • A Command Line Interface (CLI) tool:
    • PowerShell on Windows.
    • Terminal on macOS.

Software Install Tasks

  • Install VSCode.
    • Tip: When installing VSCode on Windows, on the Select Additional Tasks page, select the boxes for Add “Open with Code” to Windows Explorer file context menu and Add “Open with Code” to Windows Explorer directory context menu.
  • After first class: Familiarize yourself with VSCode by completing the Get started with Visual Studio Code tutorial.

VSCode Configuration

Download and Configure Java

Java is straightforward to download, but we must configure VSCode to use it.

  1. Download Java for your platform:
  2. Extract to a Specific Location:
    • Windows:
      • Create a new folder, e.g., C:\Program Files\Java\. You might need admin rights to create this top-level folder.
      • Open your Downloads folder.
      • Right-click microsoft-jdk-21.0.8-windows-x64.zip and select Extract All..
      • For Select a Destination and Extract Files, type: C:\Program Files\Java\
      • This creates a folder in that location called: jdk-21.0.8+9.
      • The full path to the JDK would then be: C:\Program Files\Java\jdk-21.0.8+9.
      • Alternative (User-specific, no admin required): Extract to a folder inside the user’s home directory, e.g., C:\Users\YourUser\Java\jdk-21.0.8+9.
    • macOS:
      • Create a folder called /Users/Shared/Java/.
      • In your Downloads directory, double click the microsoft-jdk-21.0.8-macos-aarch64.tar.gz file to unzip it. This creates a folder in your Downloads directory called jdk-21.0.8+9.
      • Move the jdk-21.0.8+9 folder into /Users/Shared/Java/, so in finder you can see /Users/Shared/Java/jdk-21.0.8+9/Contents/Home.
  3. Add Java to your system path (Windows):
    1. In Windows, press the Windows key and type Env.
    2. Open Edit the system environment variables.
    3. Click Environment Variables…
    4. In the bottom half of the window, under System variables, double-click the row that says Path.
    5. Add the following entry: C:\Program Files\Java\jdk-21.0.8+9\bin
  4. Configure VS Code:
    • Open VS Code.
    • Go to File > Preferences > Settings (or Code > Settings > Settings on macOS).
    • Search for java.configuration.runtimes.
    • Click “Edit in settings.json”.
    • Add the following entry (adjust path for your specific installation):

Windows:

{
    // Java JDK Configuration
    "java.configuration.runtimes": [
        {
            "name": "JavaSE-21",
            "path": "C:\\Program Files\\Java\\jdk-21.0.8+9",
            "default": true
        }
    ],
    "java.jdt.ls.java.home": "C:\\Program Files\\Java\\jdk-21.0.8+9",
    "java.server.launchMode": "Standard"
}

macOS:

{
    // Java JDK Configuration
    "java.configuration.runtimes": [
        {
            "name": "JavaSE-21",
            "path": "/Users/Shared/Java/jdk-21.0.8+9/Contents/Home",
            "default": true
        }
    ],
    "java.jdt.ls.java.home": "/Users/Shared/Java/jdk-21.0.8+9/Contents/Home", // Must match the above path
    "java.server.launchMode": "Standard",
}
  • Important: Remember to use double backslashes \\ in Windows paths within JSON.
  1. Restart VS Code: Close and reopen VS Code for the changes to take full effect.