-
Notifications
You must be signed in to change notification settings - Fork 0
Installing Java
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: https://www.oracle.com/java/technologies/javase/jdk-faqs.html
1) Go to: https://jdk.java.net/
- For older versions: https://jdk.java.net/archive/
2) Choose the Ready for use JDK
3) Download the proper package under Builds
4) Extract the
.zipor.tar.gzto obtain folder5) Remember location of JDK folder.
6) Continue onto Installing OpenJDK.
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
Javafolder if needed- I recommend creating an
OpenJDKfolder incase you wantOracleJDKas well2) Open Environmental Variables
- On your keyboard, press
Window + Rto open the Run tool- Type in
SystemPropertiesAdvancedand hit Enter- Towards the bottom, click
Environmental Variables3) Under System Variables, search for the
Pathvariable4) Double click
Pathto add a new entry5) Add the following path
- With
OpenJDKfolder:C:\Program Files\Java\OpenJDK\[Your JDK Folder]\bin- Without
OpenJDKfolder:C:\Program Files\Java\[Your JDK Folder]\bin- Examples
- With
OpenJDKfolder
C:\Program Files\Java\OpenJDK\jdk-15.0.1\binC:\Program Files\Java\OpenJDK\jdk-14.0.2\bin- etc..
- Without
OpenJDKfolder
C:\Program Files\Java\jdk-15.0.1\binC:\Program Files\Java\jdk-14.0.2\bin- etc..
6) Move the path to the top with the the ^ button
- If multiple paths (including OracleJDK) exists, the first one (top-most) will be used
- Can move different JDK paths to the top to switch which JDK is default
1) Go to: https://www.oracle.com/java/technologies/javase-downloads.html
- For older versions: https://www.oracle.com/java/technologies/oracle-java-archive-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
Open the terminal/command prompt
Use the following command:
java -versionIf it displayed a version, you've installed Java!