This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Locates Java versions and optionally sets JAVA_HOME and JRE_HOME. | |
.DESCRIPTION | |
The Find-Java function uses PATH, JAVA_HOME, JRE_HOME and Windows Registry to retrieve installed Java versions. | |
If run with no options, the first Java found is printed on the console. | |
.PARAMETER Vendor | |
Selects Java vendor, currently supports Oracle, OpenJDK and IBM. Defaults to Any. | |
.PARAMETER Architecture | |
What processor architecture to match. Valid options are 32, 64, Match and All. Match detects what integer size is used for the PowerShell process, and matches the architecture. If Wow64 is available, 64 bit versions of Java are selected first. |