Performing a Silent Windows Oracle JRE Installation

Silent (GUI-less) JRE installations are a necessity if you want to script the build of a new Windows server with as little human interaction as possible.

It's very simple to install a JRE silently through a script, you call the EXE from the command prompt with a few customization parameters. The command looks like this:

jre-8u301-windows-x64.exe AUTO_UPDATE=Disable EULA=Disable INSTALL_SILENT=Enable INSTALLDIR=c:\java\jre-8_301 NOSTARTMENU=Enable WEB_ANALYTICS=Disable WEB_JAVA=Disable
  • AUTO_UPDATE = "Enable" or "Disable" depending on whether you want the JRE to automatically update. I always "Disable" so that I can control JRE updates.
  • EULA = "Disable" to turn off the End User License Agreement (EULA) prompting.
  • INSTALL_SILENT = "Enable" to run the installer without a GUI.
  • INSTALLDIR = the path that you want the JRE installed into. "c:\java\jre-8_301" in the example above.
  • NOSTARTMENU = "Enable" to prevent any JRE-related items from being added to the Start Menu.
  • WEB_ANALYTICS = "Disable" to prevent snooping on your JRE installation.
  • WEB_JAVA = "Disable" to prevent Java Web App launching.

For more detail, visit: https://java.com/en/download/help/silent_install.html