---
id: build-with-jdk21
trigger: "when running Maven compilation or tests in foodie_server"
confidence: 0.9
domain: "workflow"
source: "claude-code-memory-import"
---

# Build foodie_server with JDK 21

## Action

- Use JDK 21 because the Maven compiler is configured with `release 21`.
- On the current machine, temporarily set `JAVA_HOME` to `C:\Users\qmj\.jdks\graalvm-jdk-21.0.7` and prepend its `bin` directory to `PATH` for the command.
- Do not change the user's global Java configuration.

## Evidence

- Imported from Claude Code project memory `project-build-env.md` on 2026-08-10.
- The system default JDK is older and fails with `invalid flag: --release`.
