Factsheet
OpenJDK 11 download? I only find Oracle JDK!
java 11 - How to install OpenJDK 11 on Windows? - Stack Overflow
Java 8 or Java 11?
Don't get Java 8. Oracle is ceasing public updates for it after Jan 2019.
Also, get Java 11, but from OpenJDK, not from Oracle. Oracle's Java 11 (available here) has become paid for many uses under their new license. So you don't want to accidentally run afoul of that.
So stick to the OpenJDK Java 11 binaries instead, that are available under a GNU GPL2 license. Here's a link to the OpenJDK Java 11 download page: https://jdk.java.net/11/
Also, Java 11 is backward compatible, so when you install Java 11, you anyway get all the features of Java 8, but not vice versa. So might as well install the latest one that has the superset of the features.
More on reddit.comCan't download Java 8 without an Oracle account?
Videos
Extract the zip file into a folder, e.g.
C:\Program Files\Java\and it will create ajdk-11folder (where the bin folder is a direct sub-folder). You may need Administrator privileges to extract the zip file to this location.Set a PATH:
- Select Control Panel and then System.
- Click Advanced and then Environment Variables.
- Add the location of the bin folder of the JDK installation to the PATH variable in System Variables.
- The following is a typical value for the PATH variable:
C:\WINDOWS\system32;C:\WINDOWS;"C:\Program Files\Java\jdk-11\bin"
Set JAVA_HOME:
- Under System Variables, click New.
- Enter the variable name as JAVA_HOME.
- Enter the variable value as the installation path of the JDK (without the
binsub-folder). - Click OK.
- Click Apply Changes.
- Configure the JDK in your IDE (e.g. IntelliJ or Eclipse).
You are set.
To see if it worked, open up the Command Prompt and type java -version and see if it prints your newly installed JDK.
If you want to uninstall - just undo the above steps.
Note: You can also point JAVA_HOME to the folder of your JDK installations and then set the PATH variable to %JAVA_HOME%\bin. So when you want to change the JDK you change only the JAVA_HOME variable and leave PATH as it is.
Eclipse Adoptium
For Java 17 and up, you can use the Eclipse Adoptium website. According to their about section, the Eclipse Adoptium project is the continuation of the original AdoptOpenJDK mission. It currently hosts Java 8, 11 and 16 through 22, offering various installation methods, including .msi installers, which will perform all the things listed in the question (Unpacking, registry keys, PATH variable updating (and JAVA_HOME), uninstaller...).
Earlier, Java 11 was hosted via AdoptOpenJDK. It now redirects to Eclipse Adoptium.