Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install openJdk 8 in windows 64 bit os

Tags:

java

java-8

I need to install open JDK in my Windows 64-bit os. I have used ORACLE open JDK and downloaded from the below link: https://jdk.java.net/8/

While downloading I have selected Accept License Agreement and installed. But, after the installation when I tried checking the version using command java -version it's showing like regular JDK.

Can anyone help me to get where I went wrong? Or is there any better vendor to install open JDK in windows. Thanks.

like image 326
saikrishna Avatar asked Oct 22 '18 12:10

saikrishna


People also ask

Does OpenJDK support java 8?

Yes, the Red Hat's build of OpenJDK version 8 for RHEL and Windows includes Java Web Start support.

How do I download OpenJDK for Windows?

Oracle's OpenJDK JDK binary for Windows is available on release-specific pages of jdk.java.net as . zip archive. Look for the builds section. Click on the zip link right next to Windows/x64.

How can I download JDK 8 for free?

You must login using an Oracle account (if you don't have an Oracle account, then creating one is free). Click Next to proceed and click Close when the setup done. That means you have successfully installed JDK 8 on your computer. For development with Java 8, you should configure JAVA_HOME as described in this guide.


3 Answers

The best way to do this is to use the builds from adoptopenjdk. They're very high quality and come in multiple variants for Windows ranging from zip files to MSI installers. Dead simple to install JDK 8, 11 or 15.

But, after the installation when I tried checking the version using command java -version it's showing like regular JDK.

This is because JAVA_HOME is pointing to your old JDK. You need to go to Control Panel and change the Environment Variables. Just do a search on Windows 10 for "Environment Variables" to easily find that configuration panel.

like image 104
Mike Thomsen Avatar answered Oct 18 '22 20:10

Mike Thomsen


Amazon offers an open jdk for Windows (and other OS), but just for Java 8, 11 and 16. You can download it from here: https://aws.amazon.com/es/corretto/

After installing it and running the java -version command, you will see something like this:

>java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment Corretto-8.242.08.1 (build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM Corretto-8.242.08.1 (build 25.242-b08, mixed mode)
like image 4
Manuel Domínguez Avatar answered Oct 18 '22 18:10

Manuel Domínguez


You need to set your java version in environment of you machine and target your JDK8 bin folder, or any JDK that you want to have at your disposal when you run java -version.

like image 2
zawarudo Avatar answered Oct 18 '22 19:10

zawarudo