JEnv-for-Windows icon indicating copy to clipboard operation
JEnv-for-Windows copied to clipboard

Suggest: Add a logic to check if the Java environment exists

Open amulet-faith opened this issue 1 year ago • 0 comments
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

amulet-faith avatar Sep 23 '24 14:09 amulet-faith