saikrishna
saikrishna

Reputation: 284

How to install openJdk 8 in windows 64 bit os

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.

Upvotes: 16

Views: 91082

Answers (5)

Manuel Domínguez
Manuel Domínguez

Reputation: 188

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)

Upvotes: 5

Gene
Gene

Reputation: 21

I know this is old but should anyone run across this in search of OpenJDK 8 go here https://developers.redhat.com/products/openjdk/download

Upvotes: 2

user3453226
user3453226

Reputation:

Azul Systems provides builds of OpenJDK and relative installers, for all OSes and JDK versions.
It also provides builds of the JDK with OpenJFX included.

The installers bind JAR files to be executed by Java on Windows.

Download from azul.com website

Upvotes: 0

Mike Thomsen
Mike Thomsen

Reputation: 37506

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.

Upvotes: 4

zawarudo
zawarudo

Reputation: 2496

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.

Upvotes: 2

Related Questions