Cannot run Java from the Windows PowerShell command prompt

前端 未结 9 870
野性不改
野性不改 2020-12-16 16:55

I have Java installed on my machine (the JRE is under C:\\Program Files\\Java) but I can\'t run any java command from the Windows PowerShell command prompt.

9条回答
  •  清酒与你
    2020-12-16 17:36

    • In the run dialog box, enter sysdm.cpl
    • In the window that came up, navigate to Advanced tab. Click on the Environment Variables button.
    • Add the location of your java installation (the bin directory) to the PATH variable.

      ;%ProgramFiles%/Java/jre%version%/bin
      

      followed by a ;

    Note:

    %version% means the java version.
    

提交回复
热议问题