[英]PowerShell term not recognized
我添加了一個JAVA_HOME
環境變量,並在 Windows 10 的PATH
中添加了一個條目,這樣我就可以在我的機器上運行 Bamboo Server。 在 PowerShell 我不能使用java -version
我得到一個錯誤,但同樣的命令在 CMD 中工作正常。
PowerShell 中的錯誤消息
java : 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 line:1 char:1
+ java
...
變量
JAVA_HOME="C:\PROGRA~2\Java\jdk1.8.0_211"
PATH=...%JAVA_HOME%\bin
為了與 PowerShell 一起使用,請刪除JAVA_HOME
變量中的雙引號。
工作變量
JAVA_HOME=C:\PROGRA~2\Java\jdk1.8.0_211
PATH=...%JAVA_HOME%\bin
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.