Can VSCode Replace IntelliJ for Java? A Hands‑On Guide

This article walks through installing VSCode, adding Java‑related extensions, configuring Maven, importing a SpringBoot project, and using essential shortcuts and debugging features, demonstrating that VSCode can serve as a lightweight, open‑source alternative for Java development.

macrozheng
macrozheng
macrozheng
Can VSCode Replace IntelliJ for Java? A Hands‑On Guide
Recently, Microsoft’s VSCode has been frequently updated with Java support, including SpringBoot and Lombok, prompting curiosity about whether VSCode can serve as a full‑featured Java IDE. After testing, it proves fully capable, offering a lightweight, open‑source alternative to Eclipse and IntelliJ IDEA.

VSCode Overview

VSCode (Visual Studio Code) is Microsoft’s open‑source integrated development tool. It has earned over 135K stars on GitHub, runs on multiple platforms, and is free and open‑source. Compared with IntelliJ IDEA, VSCode is more lightweight and offers faster build and response times.

Below are screenshots of using VSCode for Java development; the interface looks quite sleek.

Download and Installation

Next we will download and install VSCode and enable Java development capabilities.

Download the VSCode zip package from https://code.visualstudio.com/Download and unzip it.

After extraction, double‑click the .exe file to launch VSCode.

If the system language is Chinese, VSCode will prompt to install a Chinese language pack—install it.

Install the Microsoft‑provided "Extension Pack for Java" which includes six essential Java extensions.

The Java extension pack has over 1.39M downloads, indicating wide adoption.

Because we often develop with SpringBoot, also install the SpringBoot extension pack (three SpringBoot extensions).

Lombok support is built‑in; enable it in settings.

Usage

We will use the open‑source e‑commerce project mall as an example to demonstrate VSCode development of a SpringBoot application.

Configure Font Size

Adjust the editor font size via the Appearance settings: click the Increase or Decrease buttons.

Import Maven Project

VSCode does not embed Maven, so install Maven separately and set environment variables. Download Maven from https://maven.apache.org/download.cgi .

After extraction, add the following to the system environment:

MAVEN_HOME=D:\developer\env\apache-maven-3.8.6
Path+=%MAVEN_HOME%\bin

Download the mall source code from https://github.com/macrozheng/mall , unzip to a directory, and open the folder in VSCode. The project builds automatically and the build speed feels faster than IDEA.

Run and Debug Project

Click the Run button in the top‑right corner to start the application.

Because the project uses SpringBoot, you can also run it via the Spring Boot Dashboard, similar to IDEA.

Debugging works with breakpoints; the left‑side variables pane shows local variable values, and you can step over or out using the toolbar buttons.

Browse Project Code

Search for a class by name with Ctrl+T.

Search by file name with Ctrl+P.

Jump to a class definition with Ctrl+Click.

If third‑party source jars lack sources, download them manually:

mvn dependency:sources -DdownloadSources=true -DdownloadJavadocs=true

Maven only downloads the binary xxx.jar by default; source jars ( xxx-sources.jar) must be fetched separately.

The built‑in IntelliCode extension provides smart code suggestions.

The Outline view on the left helps locate variables and methods quickly.

Shortcuts

View class source: Ctrl+Click Command palette: Ctrl+Shift+P + command name

Search file by name: Ctrl+P Search class by name: Ctrl+T Toggle comment: Ctrl+/ Toggle sidebar: Ctrl+B Global find/replace: Ctrl+Shift+F Find in file: Ctrl+F Rename symbol: Fn Find references: Shift+F12 Go to implementation: Ctrl+F12 Format document: Shift+Alt+F Extract variable/method: Ctrl+Shift+R Undo: Alt+Left Arrow Redo: Alt+Right Arrow Quick fix suggestions: Alt+. Move line up/down: Alt+Up Arrow / Alt+Down Arrow Delete line:

Ctrl+Shift+K

Conclusion

Testing VSCode for SpringBoot development shows it can fully meet Java developers’ needs. VSCode offers a sleek interface, powerful features, and a rich extension ecosystem. Compared with IntelliJ IDEA, its build and response speeds are faster, though it lacks some minor conveniences such as colored console logs and automatic source‑code download for third‑party libraries. Nevertheless, rapid feature updates make VSCode a promising Java development tool.

Reference

Official documentation: https://code.visualstudio.com/docs/languages/java

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

JavaBackend DevelopmentSpringBootVSCodeTutorialIDE
macrozheng
Written by

macrozheng

Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.