Setting Up Your Java Development Environment
S7 Inf A3 — Java for Graphical and Mobile Programming
Stéphane Derrode — Centrale Lyon
Do this before your first lab session (TD1). The setup takes about 20–30 minutes. If you run into problems, bring your laptop to the first session and we will sort it out together.
What you will install
| Tool | Purpose | Version |
|---|---|---|
| JDK 17 | Java compiler & runtime | 17 LTS |
| Maven | Build tool & dependency manager | 3.9+ |
| VSCodium | Code editor (open-source VS Code) | latest |
| Extension Pack for Java | Java support in VSCodium | latest |
Step 1 — Install JDK 17
Windows & macOS
- Go to https://adoptium.net
- Select Temurin 17 (LTS) and download the installer for your OS
- Run the installer — accept all defaults
- Open a new terminal and verify:
You should see something like:
openjdk version "17.0.x"
Linux (Debian/Ubuntu)
If you have multiple Java versions installed: set JDK 17 as the default with
sudo update-alternatives --config java(Linux) or by settingJAVA_HOMEin your environment.
Step 2 — Install Maven
Windows
- Download the binary zip from https://maven.apache.org/download.cgi — choose
apache-maven-3.x.x-bin.zip - Unzip to a location like
C:\Program Files\Maven\ - Add
C:\Program Files\Maven\binto yourPATHenvironment variable: - Search for "Edit the system environment variables" in the Start menu
- Click Environment Variables → select
Path→ Edit → New → paste the path - Open a new terminal and verify:
macOS
Linux (Debian/Ubuntu)
Expected output:
Step 3 — Install VSCodium
- Go to https://vscodium.com
- Download and install the version for your OS
- Launch VSCodium
Why VSCodium and not VS Code? VSCodium is the open-source build of VS Code without Microsoft telemetry. It is functionally identical for our purposes.
Step 4 — Install the Java Extension Pack
- In VSCodium, open the Extensions panel:
-
Click the puzzle-piece icon in the left sidebar, or press
Ctrl+Shift+X(Cmd+Shift+Xon macOS) -
In the search box, type:
-
Find the entry by VS Code Java Team (identifier:
vscjava.vscode-java-pack) and click Install
This installs the following extensions automatically: - Language Support for Java (Red Hat) — syntax highlighting, autocomplete, refactoring - Debugger for Java — breakpoints, step-through debugging - Maven for Java — Maven project management directly in the editor - Java Test Runner — run JUnit tests from the editor
- When installation finishes, VSCodium may prompt you to reload — click Reload if asked.
Step 5 — Create your first Maven project
Option A — Using the VSCodium command palette (recommended)
- Press
Ctrl+Shift+P(Cmd+Shift+Pon macOS) to open the Command Palette - Type
Maven: Create Maven Projectand select it - Choose maven-archetype-quickstart
- Select version 1.5
- Fill in the prompted fields:
- Group Id:
com.s7infa3 - Artifact Id:
td1 - Version:
1.0(press Enter to accept default) - Package:
com.s7infa3(press Enter to accept) - Choose a folder where the project will be created (e.g. your
DocumentsorDesktop) - Confirm in the terminal that appears at the bottom — press Enter when prompted
Option B — Using the integrated terminal
- Open the integrated terminal: Terminal ▸ New Terminal (or
Ctrl+`) - Navigate to where you want to create the project, then run:
Step 6 — Open the project in VSCodium
- In VSCodium: File ▸ Open Folder…
- Navigate to and select the
td1/folder that was just created - VSCodium will detect the Maven project automatically — you should see a Java Projects panel appear in the left sidebar after a few seconds
Step 7 — Configure Java 17 in pom.xml
Open pom.xml (visible in the file explorer on the left) and replace its content with:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.s7infa3</groupId>
<artifactId>td1</artifactId>
<version>1.0</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
Save the file (Ctrl+S). VSCodium may show a notification — click Synchronize or Update if prompted.
Step 8 — Run your first program
- In the file explorer, open
src/main/java/com/s7infa3/App.java - You should see the
main()method withSystem.out.println("Hello World!"); - Click the ▶ Run button that appears just above the
main()method (or right-click → Run Java) - The integrated terminal at the bottom should print:
Congratulations — your environment is ready!
Useful VSCodium shortcuts
| Action | Windows/Linux | macOS |
|---|---|---|
| Open command palette | Ctrl+Shift+P |
Cmd+Shift+P |
| Open terminal | Ctrl+` |
Cmd+` |
| Open extensions | Ctrl+Shift+X |
Cmd+Shift+X |
| Format document | Ctrl+Shift+I |
Cmd+Shift+I |
| Go to definition | F12 |
F12 |
| Quick fix / import | Ctrl+. |
Cmd+. |
| Rename symbol | F2 |
F2 |
| Toggle comment | Ctrl+/ |
Cmd+/ |
| Run last program | Ctrl+F5 |
Ctrl+F5 |
Troubleshooting
"java: command not found" or "mvn: command not found"
→ The tool is installed but not in your PATH. Restart your terminal after installation. On Windows, restart VSCodium entirely after changing environment variables.
VSCodium shows red squiggles everywhere / "Build path is incomplete"
→ Wait 30–60 seconds for VSCodium to finish indexing the project. If the problem persists: Ctrl+Shift+P → Java: Clean Java Language Server Workspace → reload.
Maven download is slow or fails
→ Maven downloads dependencies from the internet on first use. Make sure you are connected to the network. On campus, check that the proxy settings are correct.
"Release version 17 not supported"
→ VSCodium is using an older JDK. Open Ctrl+Shift+P → Java: Configure Java Runtime and set the project JDK to 17.