Setting up a Java Spring Boot development environment on Windows 11 involves several steps. Here’s a step-by-step guide to help you get started:
Step 1: Install Java Development Kit (JDK)
Download JDK: Go to the Oracle Java SE Downloads page and download the latest JDK version (e.g., JDK 17 or higher).
Install JDK: Run the installer and follow the on-screen instructions to install JDK on your system.
Set Environment Variables:
Right-click on This PC and select Properties.
Click on Advanced system settings.
In the System Properties window, click on Environment Variables.
Under System variables, find the PATH
variable and click Edit. Add the path to the JDK's bin
directory (e.g., C:\Program Files\Java\jdk-17\bin
).
Create a new variable named JAVA_HOME
and set its value to the JDK installation directory (e.g., C:\Program Files\Java\jdk-17
).
Step 2: Install Maven
Download Maven: Go to the Apache Maven download page and download the latest Maven binary archive (e.g., apache-maven-3.8.3-bin.zip).
Extract Maven: Extract the downloaded archive to a directory of your choice (e.g., C:\apache-maven-3.8.3
).
Set Environment Variables:
Add the Maven bin
directory to the PATH
variable (e.g., C:\apache-maven-3.8.3\bin
).
Create a new variable named MAVEN_HOME
and set its value to the Maven installation directory (e.g., C:\apache-maven-3.8.3
).
Step 3: Install Spring Boot CLI (Optional)
Download Spring Boot CLI: Go to the Spring Boot CLI download page and download the latest Spring Boot CLI archive (e.g., spring-boot-cli-2.6.3-bin.zip).
Extract Spring Boot CLI: Extract the downloaded archive to a directory of your choice (e.g., C:\spring-boot-cli-2.6.3
).
Set Environment Variables:
Add the Spring Boot CLI bin
directory to the PATH
variable (e.g., C:\spring-boot-cli-2.6.3\bin
).
Step 4: Install an IDE (Optional)
Download and Install IDE: You can use any IDE that supports Java development, such as IntelliJ IDEA, Eclipse, or Visual Studio Code.
Configure IDE: Set up your IDE to use the JDK, Maven, and Spring Boot CLI if you plan to use them.
Step 5: Verify Installation
Open Command Prompt: Open the command prompt and type java -version
to verify the JDK installation.
Verify Maven: Type mvn -version
to check if Maven is correctly installed.
Verify Spring Boot CLI: Type spring --version
to confirm the Spring Boot CLI installation.
Step 6: Create Your First Spring Boot Project
Open IDE: Open your IDE and create a new Spring Boot project.
Set Up Project: Follow the IDE’s prompts to set up the project, including selecting the Spring Initializer template if available.
Run Project: Run your Spring Boot project to ensure everything is set up correctly.
This setup should get you started with Java Spring Boot development on Windows 11. If you encounter any issues or need further assistance, feel free to ask!