FelixSelter / JEnv-for-Windows

Change your current Java version with one line
Apache License 2.0
676 stars 87 forks source link

Error when powershell.exe is not in the PATH #21

Closed bkmeneguello closed 2 years ago

bkmeneguello commented 2 years ago

I don't have C:\WINDOWS\System32\WindowsPowerShell\v1.0\ in my PATH because I use the portable PowerShell, which is installed as C:\Program Files\PowerShell\7\pwsh.exe. It could be possible to check if it exists and use it before trying the windows build-in?

jenv change openjdk17
'Powershell.exe' is not recognized as an internal or external command,
operable program or batch file.
FelixSelter commented 2 years ago

This will be implemented in Version 2 a complete rewrite of this application which should be more scalable and support tests as well as being more close to the original

FelixSelter commented 2 years ago

version 2 is now published and contains this feature. Please report any bugs.

Thank you for your suggestion

FelixSelter commented 2 years ago

Ah, damn it. Github closed it because of my commit message. I pushed an update. Now JEnv asks you to restart with admin rights so it can change the system path. Thank you for your suggestion. Please report any further problems