ant - not recognized as an internal

后端 未结 8 2189
粉色の甜心
粉色の甜心 2020-12-09 09:49

I have installed ant(apache-ant-1.7.0). But when i run the ant command in dos command prompt, it says

‘ant’ is not recognized as an internal or external comm         


        
8条回答
  •  温柔的废话
    2020-12-09 10:25

    That just means it's not on the path.

    Edit your PATH environment variable to include Ant's "bin" directory. The exact steps for editing your path with depend on your operating system, but for example on XP:

    • Bring up Explorer (Windows-E)
    • Right-click on "My Computer" and select "Properties"
    • On the "Advanced" tab, click on "Environment Variables"
    • If the set of "user variables" already contains a PATH entry, edit that. Otherwise create a new entry. (If you want it to affect all users, set it as a system environment variable.)
    • Add the Ant bin directory without any quotes. Use a semi-colon to separate it from another entry. For example, you might have:

      c:\Program Files\Utils;c:\Program Files\Ant 1.7\bin
      
    • Start a new Command Prompt to see the changes (they won't affect existing windows)

提交回复
热议问题