Like the video 🙂 and follow instructions below:
========================================
Install Java Development Kit (JDK)
sudo apt install openjdk-17-jdk # For Ubuntu/Debian
brew install openjdk # For macOS
choco install openjdk # For Windows (using Chocolatey)
Install VSCode (if not installed)
https://code.visualstudio.com
Install Java Extension Pack in VSCode
code --install-extension vscjava.vscode-java-pack
Verify Java installation
java -version
javac -version
Create a new Java project
mkdir MyJavaProject
cd MyJavaProject
code .
Create a new Java file inside the project
touch Main.java
Write and save a simple "Hello World" Java program in Main.java
public class Main {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
Compile the Java file
javac Main.java
Run the compiled Java program
java Main
how to create new java project in vscode, install java jdk in visual studio code, command line java jdk installation, java jdk install on windows pc, java jdk install on macOS, java jdk install on linux, sudo apt install openjdk-17-jdk, brew install openjdk, choice install openjdk, official java jdk download site, install java vscode extension from command line, vscode java extension installation, check java version from command line, check javac version from terminal, creating hello world java app in vscode, compile java main program from command line, run java program in vscode from terminal.
In this tutorial I will show you how to install java in vscode and run java in visual studio code. Simple setup instructions, using command line only. #java #javaprogramming #vscode #visualstudiocode
Timestamps:
00:11 how to create new java project in vscode
00:18 how to install java jdk in visual studio code from command line (windows pc, macOS, linux)
00:26 to install java jdk on linux run sudo apt install openjdk-17-jdk
00:34 to install java jdk on macOS run brew install openjdk
00:42 to install java jdk on Windows PC run choice install openjdk or visit official java jdk download site
00:57 how to install java vscode extension (extensions) from command line using code command
01:27 how to install vscode java extension
01:42 how to check which java and javac version I have from command line (terminal)
01:56 creating your first hello world java app in vscode from command line
02:15 compile java main program from command line
02:20 how to run java program in vscode from terminal
Watch video How to Run Java In VSCode (Visual Studio Code) online without registration, duration hours minute second in high quality. This video was added by user Ghost Together 23 September 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 142 once and liked it 3 people.