Many administrators dread Java installations because Oracle's Windows installer bundles unwanted software like the Ask.com toolbar and McAfee security scans. Even worse, Java's automatic updater may reinstall these components during security updates. The offline installer (which claims to be "clean") still contains the same bundled software.
Oracle provides two cleaner options if you dig deeper:
1. Windows Offline (without sponsors) installer:
https://javadl.oracle.com/webapps/download/AutoDL?BundleId=248242_ce59cff5c23f4e2eaf4e778a117d4c5b
2. Archive versions (no installer):
https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html
For automated deployments, use this PowerShell script that performs a silent install while rejecting all extras:
$installerPath = "jre-8u371-windows-x64.exe"
$args = "/s INSTALL_SILENT=1 AUTO_UPDATE=0 WEB_JAVA=1 WEB_JAVA_SECURITY_LEVEL=H NOSTARTMENU=1 SPONSORS=0"
Start-Process -FilePath $installerPath -ArgumentList $args -Wait
For production servers, I recommend using AdoptOpenJDK builds instead of Oracle JRE:
# Chocolatey install:
choco install adoptopenjdk11
# Manual download:
https://adoptium.net/temurin/releases/
If you must use Oracle JRE, extract it manually without running the installer:
# Using 7-Zip:
7z x jre-8u371-windows-x64.exe -ojre-install
cd jre-install\.rsrc\1033\JAVA_CAB10
extrac32 111
# Resulting JRE will be in 'tools.zip'
After installation, disable Java updater services:
sc config "Oracle Java Quick Starter" start= disabled
sc stop "Oracle Java Quick Starter"
Remove-Item "C:\ProgramData\Oracle\Java\javapath\" -Recurse -Force
- No jucheck.exe in scheduled tasks
- No Java updater services running
- No browser plugins installed
- No Ask.com related registry entries
Every sysadmin and developer who's worked with Java on Windows knows the frustration: Oracle's official JRE installer comes bundled with unwanted software like the Ask.com toolbar and McAfee security scanner. Even worse, the Java updater will reinstall these during security updates if they're missing.
For a clean JRE installation, always use the offline installer:
1. Download from Oracle's official site:
https://www.java.com/en/download/manual.jsp
2. Use this direct download pattern (replace version numbers):
https://javadl.oracle.com/webapps/download/AutoDL?BundleId=version_specific_id
3. During installation, uncheck all optional offers
Many enterprise applications bundle their own JRE. You can extract a clean version from these:
# From Atlassian products:
1. Navigate to %PROGRAMFILES%\Atlassian\Application\jre
2. Copy the entire directory to your desired location
3. Set JAVA_HOME to point to this location
# Alternative from OpenJDK builds:
https://adoptium.net/
For server deployments, use this PowerShell script for silent installation:
$installerPath = "jre-8u351-windows-x64.exe"
$installArgs = "/s INSTALL_SILENT=1 STATIC=1 AUTO_UPDATE=0 WEB_JAVA=0 WEB_ANALYTICS=0 NOSTARTMENU=1 SPONSORS=0"
Start-Process -FilePath $installerPath -ArgumentList $installArgs -Wait
# Verify installation
if (Test-Path "C:\Program Files\Java\jre1.8.0_351") {
Write-Host "JRE installed cleanly"
} else {
Write-Host "Installation failed"
}
After installation, lock down the JRE to prevent unwanted behavior:
# Disable Java updater
reg add "HKLM\SOFTWARE\JavaSoft\Java Update\Policy" /v EnableJavaUpdate /t REG_DWORD /d 0 /f
# Remove browser plugin if present
reg delete "HKLM\SOFTWARE\MozillaPlugins\@java.com/JavaPlugin" /f
# Set proper permissions
icacls "C:\Program Files\Java\jre*" /inheritance:r /grant:r "Administrators:(OI)(CI)F" /grant:r "SYSTEM:(OI)(CI)F"
Run this check to ensure no unwanted components were installed:
# Check for Ask.com related files
Get-ChildItem "C:\Program Files (x86)" -Recurse -Force -ErrorAction SilentlyContinue |
Where-Object { $_.Name -match "Ask" } | Select-Object FullName
# Check installed programs
Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |
Where-Object { $_.DisplayName -match "Ask|McAfee" } | Select-Object DisplayName
For large-scale deployments, consider these alternatives:
- Microsoft's OpenJDK builds (https://www.microsoft.com/openjdk)
- Amazon Corretto (https://aws.amazon.com/corretto/)
- Azul Zulu (https://www.azul.com/downloads/)
When updating Java, always:
- Download the new offline installer
- Uninstall the previous version completely
- Install the new version using your documented clean process
- Reapply your security configurations