VS Code ready for Java programming step-by-step:
Step 1: Install JDK (VERY IMPORTANT)
VS Code alone is not enough for Java. You must install JDK first.
Option 1: Install Oracle JDK (recommended for beginners)
1. Open browser → search “Oracle JDK download”
2. Open Oracle official site
3. Download JDK 17 (LTS) for Windows
4. Run the .exe file
5. Click Next → Next → Install
6. Finish
✔ This automatically sets Java path in most systems.
Check if Java installed
1. Press Windows + R
2. Type cmd → Enter
3. Type:
java -version
If you see version info → ✅ Java installed correctly
Step 2: Download & Install VS Code
1. Open browser → search “VS Code download”
2. Open [Link]
3. Download Windows version
4. Run installer
5. While installing, TICK THESE OPTIONS:
o ✅ Add to PATH
o ✅ Open with Code
o ✅ Register Code as editor
6. Click Next → Install → Finish
Step 3: Install Java Extensions in VS Code
1. Open VS Code
2. Click Extensions icon (left side)
(or press Ctrl + Shift + X)
3. Search:
Extension Pack for Java
4. Install the one by Microsoft
📦 This installs:
Java language support
Debugger
Maven
Test Runner
Step 4: Create Your First Java Program
1. Create a folder anywhere (example: JavaPrograms)
2. Open VS Code → File → Open Folder
3. Select JavaPrograms
4. Right-click → New File
5. Name it:
HOW TO WRITE A PROGRAM IN JAVA:
ACTIVITY TO WRITE A MSG IN NOTEBOOK:
*[Link] the bag
*[Link] the bag
*[Link] the notebook
*[Link] the notebook
*[Link] the msg
*[Link] the notebook
*[Link] the bag
IN SIMILAR WAY TO WRITE THE CODE IN JAVA :
*[Link] a class
*[Link] the class
*[Link] the main method
*[Link] the main method
*[Link] the msg
*[Link] the main method
*[Link] the class.
simple Java code:
class FirstProgram {
public static void main(String [] args) {
[Link]("Welcome to [Link]!");
👉 Prints message on the screen: Welcome to Highlet!