我在 Windows 2012 服务器上使用 PowerShell,我从 System32 中删除了所有 java 命令,重新安装了 jdk,将 JAVA_HOME 和 Path 设置为指向新安装。而且我仍然收到以下错误:
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
+ ~~~~
+ CategoryInfo : ObjectNotFound: (java:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Run Code Online (Sandbox Code Playgroud)