JEnv-for-Windows
JEnv-for-Windows copied to clipboard
Suggest: Add a logic to check if the Java environment exists
trafficstars
Hi, The following error occurs when I run /src/jenv.ps1 in a new operating system without any java environment:
PS C:\Program Files My\jenv\src> .\jenv.ps1
Get-Command : The term 'java' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At C:\Program Files My\jenv\src\jenv.ps1:68 char:15
+ $javaPaths = (Get-Command java -All).source