Java command not found

后端 未结 1 746
滥情空心
滥情空心 2021-01-20 06:52

I\'m trying to get the java command to work on my computer. Whenever I try to use it, I get the error \"\'java\' is not recognized as an internal or...\"

Wha

相关标签:
1条回答
  • 2021-01-20 07:42

    Have you checked your environment variables for Windows? When you installed the JDK/JRE the directory should have been added to the PATH variable. The directory added needs to contain the java.exe executable. It should be located in C:\Program Files\Java or something like that if you installed it using the default settings. Once you find that directory find the bin directory inside it.

    In order to check that:

    • Right click My Computer and hit Properties
    • On the left side hit Advanced System Settings
    • Hit the Advanced tab and then Environment Variables down at the bottom
    • Find the PATH variable and then hit edit. Confirm that the location of the JDK /bin directory is there, if it is not then add it.

    Also, if the JAVA_HOME variable isn't already set, this may be a good idea.

    0 讨论(0)
提交回复
热议问题