Chapter 1.6☕ 12 min read

Setup VS Code and CLI

Lightweight editor meets powerful backend — best of both worlds.

01The Concept: Lightweight Editors & CLI

The Hyderabad Metro Rail Analogy:

IntelliJ and Eclipse are like owning a personal car. They are heavy, take up resources (RAM), but have everything you need inside.

VS Code is like riding the Hyderabad Metro. It is extremely lightweight, starts in seconds, and takes up very little space. But to make it work for Java, you have to tap your card (install the Java Extension Pack) to activate the services.

Spring Boot CLI is for advanced users who want to create and run apps just using terminal commands — no IDE at all.

02VS Code vs Heavy IDEs

VS Code has become the editor of choice for many developers. Here's why it works beautifully for Spring Boot:

  • Lightweight & fast: Starts in seconds, minimal RAM usage
  • Rich extension ecosystem: Java, Spring, and Maven extensions available
  • Integrated terminal: Run Maven/Gradle commands without switching apps
  • Git integration: Built-in source control
  • Perfect for polyglot developers: Frontend (Angular/React) + Backend (Spring Boot) in one editor
03Step-by-Step: Running in VS Code
  1. Open VS Code.
  2. Go to Extensions tab (Ctrl+Shift+X).
  3. Search and install Extension Pack for Java (by Microsoft).
  4. Search and install Spring Boot Extension Pack (by VMware).
  5. Go to File → Open Folder and select your extracted Spring Boot project.
  6. VS Code will index the project for a few seconds.
  7. Open src/main/java/com/devinhyderabad/Application.java.
  8. Above public class Application, you will see a clickable Run link. Click it.
04Terminal Method: Maven Wrapper

Alternatively, use the integrated terminal to run with Maven:

# Navigate to your project folder
cd path/to/my-first-app

# Run Spring Boot using Maven Wrapper
./mvnw spring-boot:run

(On Windows, use mvnw.cmd spring-boot:run instead.)

To stop the app, press Ctrl + C in the terminal.

05Why It Matters / Enterprise Note

Enterprise Note: Many frontend developers (Angular/React) who occasionally need to touch the backend prefer VS Code because they already use it for frontend work. The mvnw spring-boot:run command is also exactly how most Docker containers and CI/CD pipelines (Jenkins, GitHub Actions) run Spring Boot apps in production.

Key Takeaways

  • ✅ VS Code + Java Extension Pack enables Spring Boot in a lightweight editor
  • ✅ Spring Boot Extension Pack adds dedicated Spring support
  • ✅ Use ./mvnw spring-boot:run to start from terminal (same as CI/CD)
  • ✅ Press Ctrl+C to gracefully stop the running application