In this beginner-friendly Java tutorial, I’ll show you how to compile and run Java code using the terminal (CLI) step by step. You’ll learn how to use `javac` and `java` commands, how to structure your Java files, and how to fix common errors.
🚀 What you will learn:
• How to compile Java code using javac
• How to run Java programs using the java CLI tool
• What .class files are
• Using flags: -d, -cp, and -sourcepath
• Organizing source code in folders
• Running Java with a custom build directory
📌 Commands used in this video:
javac Main.java
java Main
javac -d build src/Main.java
java -cp build Main
💡 More Java tutorials coming soon — subscribe to follow along!
Channel: TryingToLearn ✅
#Java #Programming #Beginner #javac #JavaTutorial #CommandLine
On this page of the site you can watch the video online How to Compile & Run Java Code Using Terminal (Beginner Tutorial) with a duration of hours minute second in good quality, which was uploaded by the user TryingToLearn 02 November 2025, share the link with friends and acquaintances, this video has already been watched 51 times on youtube and it was liked by 8 viewers. Enjoy your viewing!