Display the location of Java Compiler which javac Display the JDK version javac -version To verify your installation, open a 'Terminal' and issue these commands.Follow the screen instructions to install JDK/JRE.
Then, proceed to 'Step 3: Write a Hello-world Java program'. If the JDK version is prior to 1.8, proceed to Step 2 to install the latest JDK otherwise, proceed to 'Step 3: Write a Hello-world Java To check if JDK has been installed, open a 'Terminal' (Search 'Terminal' or Finder ⇒ Go ⇒ Utilities ⇒ Terminal) and issue this command: javas - version Step 1: Check if JDK has been Pre-Installed