How to install Oracle JDK and JRE in seconds on Windows
The 2 software that JDA WMS requires for it to work on any system is JDK and Perl — be it Windows or RHEL (Redhat Enterprise Linux). What bothers me the most is that setting up Oracle JRE can be an issue on Windows Server if you do it with the preinstalled JRE package that comes with the JDK installer. For the oddest reasons, it would sometimes work like a charm — without issues. Whereas there are times that it would just hang, you can reboot the VM or uninstall and re-install and it would still not work. I’ve seen this pattern on both JDK 7 and JDK 8 versions mostly on Windows Servers 2016/2019 and even sometimes on Windows 10.
JDK successful, moving towards JRE installation:
Some users reporting it on:
JDK 8 installation does not progress on Windows 10
Thanks for contributing an answer to Super User! Please be sure to answer the question. Provide details and share your…
What you can do is simply do a silent install instead via the command line. However, please make sure that cmd is running as an Administrator and run the installer as shown below:
> c:\downloads\jdk-11.0.4_windows-x64_bin.exe /s ADDLOCAL="ToolsFeature,SourceFeature"JDK 8:
> c:\downloads\jdk-8u202-windows-i586.exe /s ADDLOCAL="ToolsFeature,SourceFeature,PublicjreFeature"
> c:\downloads\jdk-8u202-windows-x64.exe /s ADDLOCAL="ToolsFeature,SourceFeature,PublicjreFeature"JDK 7:
> c:\downloads\jdk-7u51-windows-i586.exe /s ADDLOCAL="ToolsFeature,SourceFeature,PublicjreFeature"
> c:\downloads\jdk-7u51-windows-x64.exe /s ADDLOCAL="ToolsFeature,SourceFeature,PublicjreFeature"JDK 6:
> c:\downloads\jdk-6u45-windows-i586.exe /s ADDLOCAL="ToolsFeature,SourceFeature,PublicjreFeature"
> c:\downloads\jdk-6u45-windows-x64.exe /s ADDLOCAL="ToolsFeature,SourceFeature,PublicjreFeature"
As soon as you hit the enter key. You will see the files under C:\Program Files\Java or C:\Program Files (x86)\Java (depending on if you’re installing a 32-bit or 64-bit version). You can then run java -version in a new session in cmd to verify if your installation was successful.
For this, you can add environment variables via the command line (run as admin).
setx /M JAVA_HOME "C:\Program Files\Java\jdk-11.0.6"
setx /M PATH %PATH%;%JAVA_HOME%\binTo Validate, open a new cmd window and run the following:
Set Environment Variables:
Validate Environment variables:
Note: JDK 11 does not come with JRE, so if you add the “PublicjreFeature”, the installation will not work. The /s flag is for silent, if you remove that, you can see that it will give you the error that JRE is not included:
If you want to also install Perl via command line. You can use either of the following commands:
> ActivePerl-188.8.131.525-MSWin32-x86–64int-403863.exe /q /l ./perl_install.log (non-verbose mode)> ActivePerl-184.108.40.2065-MSWin32-x86–64int-403863.exe /q /l*v ./perl_install.log (verbose mode)
If you have any other questions. You’re welcome to ask me in the comments below!