Setup REST API Build Environment (individual)
Java Development Kit (JDK)
Install any JDK distribution (e.g., Eclipse Temurin) of version 21 or higher if you don't have it already. To check, execute javac -version command in your terminal.
For Windows,
- just download and launch the JDK installer
- or
- use Winget (e.g., by executing winget install EclipseAdoptium.Temurin.25.JDK in your terminal)
For MacOS,
- Homebrew is the preferred method (e.g., brew install --cask temurin@25)
For Linux,
- use your package manager (e.g., sudo apt install temurin-25-jdk for Ubuntu)
Make sure the JAVA_HOME environment variable is set and the bin directory of your JDK installation is added to the PATH environment variable. You can verify that everything is set up correctly by executing javac -version command in your terminal, which should print the version of your JDK. If it doesn't, you need to set the environment variables manually as described below.
For Windows, you can set these variables through System Properties or by using PowerShell:
- setx JAVA_HOME "C:\Program Files\Java\jdk-25" (or any other place where your JDK is installed)
- setx PATH "%JAVA_HOME%\bin;%PATH%" (should be executed after setting JAVA_HOME)
- don't forget to restart your terminal after making these changes
For MacOS and Linux, you can add the following lines to your shell profile (e.g., ~/.bashrc or ~/.zshrc):
- export JAVA_HOME=/path/to/your/jdk
- export PATH=$JAVA_HOME/bin:$PATH
- don't forget to source your profile after making these changes (e.g., source ~/.bashrc or source ~/.zshrc)
Now you should be able to execute javac -version command in your terminal.
Maven
Install Apache Maven of version 3.9.x or higher (but not 4.x - it's still in development) if you don't have it already. To check, execute mvn -version command in your terminal.
For Windows,
- download and extract the binary from the official website
- add the bin directory of your Maven installation to the PATH environment variable and restart your terminal
For MacOS,
- Homebrew is the preferred method (e.g., brew install maven)
- make sure the bin directory of your Maven installation is in the PATH environment variable
- source your profile after making these changes (e.g., source ~/.zshrc)
For Linux,
- use your package manager (e.g., sudo apt install maven for Ubuntu)
- or
- download and extract the binary from the official website and add the bin directory of your Maven installation to the PATH environment variable
- source your profile after making these changes (e.g., source ~/.bashrc)
Now you should be able to execute mvn -version command in your terminal.
Submission
Execute the javac -version and mvn -version commands in your terminal, take a screenshot, and submit the output to the assignment submission page on myCourses.