Title here
Summary here
Our first program will print the classic “hello world” message. Here’s the full source code.
To run the program, compile the code into a .class
file and then use java
to execute it.
Sometimes we’ll want to build our programs into binaries that can be executed directly. In Java, this usually means creating a JAR (Java ARchive) file.
First, compile the code and then package it into a JAR file:
We can then execute the JAR file directly using the java -jar
command.
Now that we can run and build basic Java programs, let’s learn more about the language.