15

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.

Meraj al Maksud
  • 1,528
  • 2
  • 22
  • 36
saikrishna
  • 274
  • 1
  • 2
  • 10
  • 1
    Please refer this:- https://stackoverflow.com/questions/2380572/java-version-not-working-in-command-prompt – A_C Oct 22 '18 at 12:33
  • 3
    For other vendors you could try Azul Systems: https://www.azul.com/downloads/zulu/zulu-windows/ – Stefan Zobel Oct 22 '18 at 12:36
  • 2
    @Ankur Chrungoo OP's problem seems to be to find a current Java 8 `OpenJDK` build as opposed to one from `Oracle`. – Anlon Burke Oct 22 '18 at 12:46
  • 9
    You've downloaded an Oracle jdk 8 build, not Openjdk. I've never used this site, but it looks like you can get a pre-built openjdk here: https://adoptopenjdk.net/ – Jorn Vernee Oct 22 '18 at 12:51
  • Thank you for your answers but i need to install openjdk from https://openjdk.java.net/ – saikrishna Oct 22 '18 at 13:04
  • @AnlonBurke this link would be helpful then: https://stackoverflow.com/questions/52511778/how-to-install-openjdk-11-on-windows – A_C Oct 22 '18 at 13:05
  • @saikrishna try this link please : https://stackoverflow.com/questions/52511778/how-to-install-openjdk-11-on-windows – A_C Oct 22 '18 at 13:05
  • @AnkurChrungoo Thank you – saikrishna Oct 22 '18 at 13:13
  • 1
    @Ankur Chrungoo He said he's looking for Java **8**, not Java 11. – Anlon Burke Oct 22 '18 at 13:17
  • @AnlonBurke I would like to believe the installation steps are same, he would only have to modify the path as per the version. – A_C Oct 22 '18 at 13:19
  • 2
    @Ankur Chrungoo Sure. His point was, where he could **download** a current Java 8 OpenJDK. – Anlon Burke Oct 22 '18 at 13:25
  • @AnlonBurke alright, I missed that! Thanks! – A_C Oct 22 '18 at 13:29
  • @AnkurChrungoo Thank you , java 11 is working fine as Expected but 8 i am looking for 8 – saikrishna Oct 22 '18 at 13:33
  • @AnlonBurke Thank you – saikrishna Oct 22 '18 at 13:34
  • 2
    openjdk.java.net does not provide release builds of OpenJDK 8 for Windows. If you look at the side bar on the page you linked, you'll see that it only lists 10 and 11. – Jorn Vernee Oct 22 '18 at 13:39
  • 1
    @saikrishna probably this link will help you : https://adoptopenjdk.net/releases.html#x64_win (scroll down for windows download option) Also, please check if you already have a different JDK installed, and if yes, then it will be good idea to uninstall it if you are not planning to use it. Otherwise, PATH environment variable could have a conflict and pick up the other JDK. – A_C Oct 22 '18 at 13:47
  • @JornVernee correct! They are only providing 10 and 11 Thank you – saikrishna Oct 23 '18 at 04:39
  • @AnkurChrungoo if i go with adoptopenjdk any issues in comming days ? – saikrishna Oct 23 '18 at 04:41
  • 1
    https://www.azul.com/downloads/zulu/zulu-windows/ ,https://adoptopenjdk.net/releases.html#x64_win ,https://developers.redhat.com/products/openjdk/download/ in these 3 providers which is best..? – saikrishna Oct 23 '18 at 04:53
  • @saikrishna difficult question :) All Open JDKs are supposed to pass the Java Technical Certification Kit. So, they should all work. Depends on what you are looking for. Some links that might help you to decide:- https://en.wikipedia.org/wiki/List_of_Java_virtual_machines , https://en.wikipedia.org/wiki/Comparison_of_Java_virtual_machines , https://en.wikipedia.org/wiki/Free_Java_implementations, – A_C Oct 23 '18 at 08:18
  • @AnkurChrungoo Thank you i am moving with redhat openJDK – saikrishna Nov 19 '18 at 05:54
  • @saikrishna good to know! – A_C Nov 19 '18 at 06:50
  • 1
    Does this answer your question? [OpenJDK availability for Windows OS](https://stackoverflow.com/questions/5991508/openjdk-availability-for-windows-os) – Arsal Imam Nov 04 '19 at 02:19

5 Answers5

4

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)
  • Thank you! Direct link to 64bit jdk: https://corretto.aws/downloads/latest/amazon-corretto-8-x64-windows-jdk.msi – Cameron Taggart Apr 14 '20 at 15:59
  • This article is also very helpful and explains very simply and succinctly how to install OpenJDK 8 on Windows 10: https://techoral.com/blog/java/openjdk-install-windows.html – GDP2 Jul 01 '21 at 21:29
2

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.

zawarudo
  • 1,907
  • 2
  • 10
  • 20
  • Thank you Milosh, i set jdk path in environment but i need to display openjdk details . could you please provide how to install openjdk from https://openjdk.java.net/ – saikrishna Oct 22 '18 at 13:03
  • Check your Path environment, perhaps you have an Oracle JRE / JDK before the Open JDK that you installed. – Igor Kudryashov Oct 22 '18 at 13:24
  • Easiest way is to download it and unzip it in some directory of your choice. After you have done this, set the PATH environment variable to the path of the bin folder. Also check that in the PATH variable no other JDK version (e.g.: from oracle) is defined. Also be aware that if you really want OpenJDK you should use the newest version: https://jdk.java.net/12/ and not JDK8 as this is not longer available as download on the page itself (you can download it only from the oracle homepage) – the hand of NOD Aug 19 '19 at 15:15
2

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.

Mike Thomsen
  • 36,828
  • 10
  • 60
  • 83
0

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

spongebob
  • 8,370
  • 15
  • 50
  • 83
0

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

Gene
  • 1