Provide Best Programming Tutorials

Hello World: How To Create Your First Java Program In Mac OS


This toturial will create your very first Java program under Mac OS.


  • JDK 1.8

  • Text Editor


  1. Writing a program and save it as

  2. Using javac command compile this java file to class file.

  3. Using java command to run the program and checkout the result


public class HelloWorld{
    public static void main(String[] args) {
        System.out.println("Hello World!");

Using javac to compile this file to class file

Using java to run the program

Leave a Reply

Close Menu