This PowerShell script, ListJavaVersions.ps1, lists all the Java versions installed on a Windows system. It checks common installation paths, user-specific program locations, and the Windows registry.
- The script searches in common installation paths, user-specific locations, and the Windows registry for Java.
- It lists each found Java version along with its installation path.
To run the script, execute it in PowerShell:
.\ListJavaVersions.ps1
- PowerShell 7 or higher.
- Windows operating system.
- The script checks file system locations (including user-specific locations) and registry entries for Java installations.
- Administrative privileges might be required to access certain registry locations.