‘ant-version’不是内部或外部命令,也不是可运行的程序

下载apache-ant-1.9.2-bin.zip后,解压目录:F:\selenium\apache-ant-1.9.2

配置环境变量,在“我的电脑->属性->高级->环境变量 ->新建

ANT_HOME
F:\selenium\apache-ant-1.9.2
JAVA_HOME
C:\Program Files\Java\jdk1.7.0_10
Path
F:\selenium\apache-ant-1.9.2\bin;C:\Program Files\Java\jdk1.7.0_10\bin;

在CMD下ant -version 一直提示:‘ant-version’不是内部或外部命令,也不是可运行的程序,找了半天原因原来是CMD不是在配置环境变量后打开的。。。。

一定要重新打开CMD就可以了,看到下面即安装成功。

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeEAAACDCAIAAAA1YzS8AAAJrklEQVR4nO3d25LcNBDGcb9u3iqvAVUEQwjhDAk5bsIZQipACATuuUgx5bW6W92SPO6Z/f+uvB651ZLH326F2WV6595vb915cf369WvXrk0AgFTIaADI6wYZDQBp3bj3OxkNAEnduE9GA0BW75LRAJDWTEYDQFrzAzIaALJ6j4wGgLTIaADI6/2Hf5DRAJAUGQ0Aed0kowEgrZuPyGgAyOoDMhoA0rr1mIwGgKxuPX5JRgNAUh8WGT0vtNVcXttTZ2udy+yf+vjzAjgxty8uZXQ0XsUBO2Z0dK4ds3LU1GQ9cM6WGb1KDfHLVSKIQbNvRoem2/fn2f7Z+XkcOHMfPflTy+gV7V8G7ODWgl68xPiu4Kwj9lOd11l/vsxfX2xJ7DY071wQpwBwwj52Z7RBzI7+46nI0LnIU7FnZz9a2VH9V/t0LsGzPwDO0ydPB2T01Jcpc6F8yS7r78czTOunIStDfZZTN88L4Ex8+o2a0UZcivxh6g8a54z+fowK1fHRdUXPe3KZjAaulk+/eeX8XEc1o6fLPwaWRUZlUDUrnf1opUb1b/dpn4nuj70PAE7VZ9++Gvv56GVkaDHkPG904m/S6Gd1pjzWAnFSsjK6XrHbw0vlgXihcx8AnKTPi4wGAGTxxXdkNABk9eV3f5HRAJDUV9+T0QCQFRkNAHnd+YGMBoCs7p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/eysa9tnTj2ddPferuY69A9Wpo33abWil7MrOeVPbOqN76mh65jXeBNWT9psj9G6YF6rr8nToWULDvlWXoJ13brI4PtpPdF2H47l4S9hT20to7mfUuobXMU72zNvTZ/XLhnmzC2V0eW+WZ8rLjcGe8RrPvdTunFbfWK89RpsutArPvP7xU3G/7H2OLkQrvnq1elJ7ya5fbal6vrp8f0ue89piPUur9j9qf+x9KKfonLc6WFzy6rxzfHXe7Jy/Z3gmqwVMvM892KWj8mT0WX1TAhS8z23szz74ex0AkBcZDQB5kdEAkBcZDQB5kdEAkBcZDQB5kdEAkBcZDQB5kdEAkBcZDQB5kdEAkBcZDQB5kdEAkBcZDQB5kdEAkBcZDQB5kdEAkBcZDQB5kdEAkBcZDQB5kdEAkFeZ0f3/99/ltZn/L8I7/k+OM28LgERWGR2NV3HAjhkdnWvHrCSmAVT9B6LhwjlwlMzEAAAAAElFTkSuQmCC" alt="" />

把CMD中的日志另存 build.log中,目录同build.xml

ant -f build.xml > build.log
上一篇:spring mvc:@RequestParam与@ModelAttribute异同


下一篇:Oracle VM VirtualBox虚拟机安装Ubuntu Server