Skip to content

Installing Java

discorddioxin edited this page Apr 1, 2021 · 9 revisions

Content


OracleJDK vs OpenJDK

  • Both

    • Maintained by Oracle
    • Free to use for personal development
    • Abide by the same specifications (JLS, JVMS)
  • OracleJDK

    • Distributed under OTN License Agreement for Java SE
    • Requires Java SE Subscription for long-term support (LTS)
      • Java 8 receives LTS without subscription until end of 2020
  • OpenJDK

    • Distributed under GPLv2+CPE
    • Support up until a new version is released

See FAQ


Downloading OpenJDK

  1. Go to: https://jdk.java.net/

  2. Choose the Ready for use JDK

  3. Download the proper package under Builds

  4. Extract the .zip or .tar.gz to obtain folder

  5. Remember location of JDK folder.

  6. Continue onto Installing OpenJDK

Installing OpenJDK

For Windows Users

  1. Move downloaded JDK folder to the C:\Program Files\Java\ folder

    • If you can't find the JDK folder, look in C:\Users\[Your Account]\Downloads
    • Create the Java folder if needed
  2. Open Environmental Variables

    • On your keyboard, press Window + R to open the Run tool
    • Type in SystemPropertiesAdvanced and hit Enter
    • Towards the bottom, click Environmental Variables
  3. Under System Variables, search for the Path variable

  4. Double click Path to add a new entry

  5. Add the following path

    • Without OpenJDK folder: C:\Program Files\Java\[Your JDK Folder]\bin
    • Examples
      • C:\Program Files\Java\jdk-15.0.1\bin
      • C:\Program Files\Java\jdk-14.0.2\bin
      • etc..
  6. Move the path to the top with the the ^ button

    • If multiple paths exists, the first one (top-most) will be used
    • Can move different JDK paths to the top to switch which JDK is default

Installing OracleJDK

Using the Installer

  1. Go to: https://www.oracle.com/java/technologies/javase-downloads.html

  2. Select your desired version

  3. Go to the download page for that version

  4. Choose the 64 Installer/Package

    • WARNING: Choosing 64 Compressed Archive will require you to perform installation manually.
  5. Use the default settings in the installer

  6. Continue onto Testing Java Installation


Testing Java Installation

  • Open the terminal/command prompt

  • Use the following command:

    • java -version

If it displayed a version, you've installed Java!

Clone this wiki locally