To Documents

Download Directions for Windows, 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 .exe file for your operating system.  For Windows7, 64-bit machine, download jdk-8u201-windows-x64.exe.
  4. Link to JDK 8--Standard Edition Documentation:
     
    http://docs.oracle.com/javase/8/docs/

B. Install Java 8 JDK

  1. Find the .exe file that you downloaded in the previous section, for example in your Downloads folder.
  2. Double click on this.exe file to begin the installation process. You may get a User Account Control dialog asking if you want to allow the following program to make changes to this computer. If so, click Yes.
  3. The Installation Wizard will start to guide you through the process. Click Next.
  4. A Custom Setup Window will ask you which tools you want selected: Development Tools, Source Code, Public JRE. Leave only Development Tools selected. You may also leave the Install to folder C:\Program Files\Java\jdk1.8.0_201 unchanged. Click Next.
  5. A Progress Window will appear showing that the installer is preparing to install and will start the installation. This may take several minutes.
  6. A Destination Folder Window will appear showing where Java will be installed: c:\Program Files\Java\jre8. Leave this destination unchanged. Click Next.
  7. Another Progress Window will appear to complete the installation.
  8. A Complete Window will appear with the message "Successfully Installed Java SE Development Kit 8 Update ?? (64-bit). Click Close.

C. Set Path to Run Java

  • Open the Control Panel.
  • Select System and Security >> On the right, select System >> On the left, select Advanced system settings
  • In the System Properties Dialog, make sure that the Advanced Tab is selected >> Click on the Environment Variables Button.
  • In the Environment Variables Dialog, in the System Variables box, scroll to and select Path >>  Click the Edit Button.
  • In the Edit System Variable Dialog, check that the Variable name is Path.  Add the following fully qualified folder name to the end of the Variable value:
    ;C:\Program Files\Java\jdk1.8.0_65\bin
    
  • Click OK in each dialog to close it. Close the Control Panel.
  • D. Testing Java

    1. In a Command Prompt Window, type
      > path
      
      Check that the path you entered in Section C, Item 5 is included in the System Path.
    2. Also in a Command Prompt Window, type
      > java
      
      Various usage options for Java will be shown.
    3. Also in the Command Prompt Window, type
      > java -version
      java version "1.8.0_65"
      Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
      Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
      
      If this output is shown, you should see the three lines of output.
    4. Now you are ready to create and run a HelloWorld application.

      1. Using NotePad or JEdit, 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 dir. 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!