Setting Up Java & Maven for Spring Boot – Step-by-Step Guide

Introduction

Before starting with Maven or Spring Boot, we need to set up the basic development environment. This includes installing Java (JDK) and Apache Maven.

Original Hashnode Post

☕ Step 1: Install Java (JDK)

Java is required to compile and run Java applications.

Download Java

Install Java 17 (LTS) (recommended). You can choose OpenJDK / Temurin or Oracle JDK.

Java JDK 17 download link: Sign in to Oracle India and download it.

Windows Installation

  1. Download the .exe installer
  2. Run the installer and follow the steps
  3. Note the installation path (example):

Set JAVA_HOME

Windows:

  • Create a system variable:
  JAVA_HOME = C:Program FilesJavajdk-17 

  • Add to Path:
%JAVA_HOME%bin

Verify Java Installation

java -version
javac -version

📦 Step 2: Install Apache Maven

Download Apache Maven 3.9.x (Binary zip) from official site
Apache Maven Download Link

Windows Installation

1 Extract the zip file Example:

 C:Program FilesApachemaven

2 Folder structure should include:

 bin
 conf
 lib

Set MAVEN_HOME

Windows

  • Create system variable:
  MAVEN_HOME = C:Program FilesApachemaven

  • Add to Path:
  %MAVEN_HOME%bin

Verify Maven Installation

mvn -version

Expected output:

Apache Maven 3.9.x
Java version: 17

⚠️ Common Installation Issues

Issue Fix
java not recognized Check JAVA_HOME
mvn not recognized Check MAVEN_HOME
Wrong Java version Restart terminal / IDE

✅ Conclusion

After completing these installation steps:

-Java is ready to compile code

-Maven is ready to build projects

-You can now create and run Maven-based Java applications

🚀 What’s Next?

Now that the development environment is ready with Java and Maven, the next steps focus on building a strong foundation before moving into Spring Boot.

Let’s Connect!

LinkedIn Github

If you have any recommended resources, better approaches to my challenges, or insights, I’d love to hear them! Drop your thoughts in the comments.

Have a wonderful day!

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
fixtures:-traditional-vs.-modular-tooling-features-and-benefits

Fixtures: Traditional vs. Modular Tooling Features and Benefits

Next Post

Beyond the Hype: 5 AI-Powered Plays to Supercharge Your B2B Sales Engine

Related Posts