xxxxxxxxxx
# Download the Java installer
Invoke-WebRequest -Uri "https://www.java.com/en/download/manual.jsp" -OutFile "java_installer.exe"
# Run the installer silently
Start-Process -FilePath "java_installer.exe" -ArgumentList "/s" -Wait
# Verify Java installation
java -version
xxxxxxxxxx
Java: https://java.com/en/
JDK: https://www.oracle.com/java/technologies/downloads/