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.
Yes, the Red Hat's build of OpenJDK version 8 for RHEL and Windows includes Java Web Start support.
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.
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.
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.
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)
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With