蚂蚁 - 无法识别为一个内部 [英] ant - not recognized as an internal

查看:168
本文介绍了蚂蚁 - 无法识别为一个内部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了蚂蚁(Apache的ANT-1.7.0)。但是,当我在DOS下运行ant命令命令提示符,它说:

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 command, operable program or batch file.

我要去哪里错了。

where i'm going wrong.

推荐答案

这只是意味着它不是路径上。

That just means it's not on the path.

编辑PATH环境变量包含Ant的bin目录。与编辑路径的确切步骤取决于您的操作系统,但例如在XP:

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:


  • 调出资源管理器(Windows的E)

  • 在我的电脑点击右键并选择属性

  • 在高级选项卡,点击环境变量

  • 如果设置用户变量中已经包含了一个路径条目,编辑。否则,创建一个新条目。 (如果你想影响所有用户,将其设置为系统环境变量。)

  • 添加Ant的bin目录中不带任何引号。用分号把它从另一个入口分开。例如,你可能有:

  • 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


  • 启动一个新的命令提示符下看到的变化(它们不会影响现有的窗口)

  • 这篇关于蚂蚁 - 无法识别为一个内部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆