How to Run Java on Mac OS Here is what you need to do to program Java from scratch and install the platform on Mac OS X or macOS Download the latest Java JDK from the Java SE download page. Double click the downloaded DMG file and follow the installer's instructions. To test the installation, open a terminal and type the following command javac version If Java is installed correctly, the program version will be displayed on the screen for example, javac. The next step is to install an integrated development environment IDE for writing and running Java code.
The program will show you a welcome page. Click the Create New Project button. In the next window, select Java from the left pane and click New at the top of the program window to select JDK. Here you need to select the location where the JDK was installed, then click Next. Basic Java syntax for beginners You will have the option to create a project from a template Create project from template. Ignore this and click the Next button.