Installing The Java Development Kit (JDK)

Windows

  1. Download the Windows x64 download from Oracle here.
  2. NOTE: Make sure that you download the Java Development Kit (JDK) not the Java Runtime Environment (JRE). The JRE only allows you to run java programs, in order to develop your own java programs you will need the JDK.

  3. Run the installer that you just downloaded. Java will install in your "Program Files" folder. (You may also have a "java" folder in "Program Files (x86)" and you should ignore it because the java kit you are currently downloading will NOT install there.)
  4. Add the path to the bin folder in the java folder that you just installed to your PATH environment variable. Make sure that it is the path to the bin folder and not the path to a file inside the bin folder. eg: C:\Program Files\Java\jdk-10.0.2\bin
  5. Verify that you have successfully installed java.

Mac OS X

  1. Make sure that you have installed Homebrew before proceeding! Look at the top of the resources page on this website for instructions on installing Homebrew.
  2. Run the folloing command in the Terminal:
  3. brew update

    brew tap caskroom/cask

    brew install Caskroom/cask/java

    The commands running successfully looks like this:

    Homebrew-java-install-commands.png
  4. Verify that you have successfully installed java.

Linux

  1. Most distros use the openJDK instead of Oracle's. This can lead to some issues with JavaFx, so make sure you install the Oracle version by running the following commands according to your distribution (if yours isn't listed, you probably have the expertise to install the Oracle version of Java on your own):
    • Ubuntu, Debian, Mint (anything using the APT package manager):
              sudo add-apt-repository ppa:linuxuprising/java
              sudo apt update
              sudo apt install oracle-java10-installer
      
              # If you have other versions of java installed, run the following
              sudo update-alternatives --config java       # Select the option with Oracle java 10
              sudo update-alternatives --config javac      # Select the option with Oracle java 10
    • Fedora, CentOS (anything using RPM packages):
      • Install the rpm package here.
      • Run the following:
                    rpm -ivh /path/to/installed/rpm  # May need sudo
                    
                    # Use the following commands to select Oracle Java 10 as the default
                    alternatives --config java
                    alternatives --config javac
  1. Add the JDK's bin directory to your PATH environment variable, if necessary (not required if using methods listed above).
  2. Verify that you have successfully installed java.

All Operating Systems

To confirm that your java installation was successful:

Oracle's installation instructions

Oracle, the company that makes Java, has documentation here