マシンに Java をインストールしていますが (JRE は の下C:\Program Files\Java
にあります)、Windows PowerShell コマンド プロンプトから Java コマンドを実行できません。
>>> java -version
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
しかし、Java が機能し、古い Windows コマンド プロンプトで Java コマンドを実行できることに気付きました。これらのコマンドを実行できないのは PowerShell だけであることがわかりました。
JRE 7 があり、Windows 8 で Windows PowerShell を使用しています。