To Documents

Download Directions for Mac, Java 8 JDK

A. Download JDK 8

  1. On the Oracle site, go to the Java SE Development Kit 8 Downloads Page:

    http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
     
  2. In the Java SE Development Kit 8u201 section, accept the License Agreement.
     
  3. In the Java SE Development Kit 8u201 section, download the file .dmg file for your operating system.  For a Mac OS, 64-bit machine, download jdk-8u201-macosx-x64.dmg
     
  4. Link to JDK 8--Standard Edition Documentation:
     
    http://docs.oracle.com/javase/8/docs/

B. Install Java 8 JDK

  1. Find the .dmg file that you downloaded, and open it. A pop up window will appear asking you to double click the icon to install JDK 8. Do so now.
     
  2. Follow the installation process, most of it is automatic. All you need to do is hit continue.
     
  3. Once installed, you will be notified and you may close the installer.
     
  4. Open system preferences by clicking the apple logo on the top right of your screen, then select system preferences.
     
  5. If installed correctly, you should see Java at the bottom of the system preferences window. Open it.
     
  6. If an update is required, please do so now.
     
  7. To test if Java is installed correctly, open a Terminal window enter
    If installed correctly, the version of Java should be displayed

D. Testing Java

  1. Now you are ready to create and run a HelloWorld application.
     
    1. Using a text editor, create a file named HelloWorld.java with these lines:
        public class HelloWorld
        {
          public static void main(String[ ] args)
          { 
            System.out.println("Hello, World!");
          }
        }
        
    2. Complile the source code file HelloWorld.java like this:
        > javac HelloWorld.java
        
    3. Type ls. You should see that the executable file HelloWorld.class has been created.
       
    4. Run the executable file:
        > java HelloWorld
        Hello, world!
        
      If you see the program output as shown, you are ready to go with Java!