VS Code is the most popular code editor on the planet. It's fast, free, and runs everywhere. But out of the box, it knows nothing about Java. Open a .java file and you get syntax highlighting. That's it. No autocomplete for your imports, no "click to run" button, no debugger.

The fix takes about two minutes. You install a Java extension, point it at a JDK, and you're writing real Java with a real debugger. Let me walk through the whole thing.

Install the Java extension

VS Code calls everything an "extension." For Java, you have a couple of options. This guide follows the one Oracle maintains, called the Oracle Java Platform extension. (Microsoft also publishes an "Extension Pack for Java" that bundles several tools together. Both get you up and running. Pick whichever you like.)

To install it: