From the course: Learning Java 11

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Hello World in the command line

Hello World in the command line - Java Tutorial

From the course: Learning Java 11

Start my 1-month free trial

Hello World in the command line

- [Instructor] Unlike other programming languages, Java code must be Compiled before it is run. This means, we'll be using one command to compile our code, and another command to execute or run our code. We won't be discussing the details of compilation in this course but it is important to know that we are taking our Java Source Code, and compiling it into Java bytecode. Upon compilation, Java class files with the .class extension, will be produced, and they will be used when we run the program. Before we compile our program, we need to go to the directory where the source code lives. I'll type ls and well see these are the folders, that are in my home directory. We'll need to go to our desktop directory, which is where this folder lives and our HelloWorld program is. So we'll go cd Desktop ls and we'll see that learning Java folders is there, cd learning-java, and you can actually hit tab to auto complete the rest of the folder name. We'll hit enter to go into this folder ls and we…

Contents