简体   繁体   English

从批处理文件呼叫蚂蚁

[英]Call ant from batch file

I want to call ant from a batch file. 我想从批处理文件中调用ant。

@echo off 
cmd.exe /k cd /d E:\work\CRM 
call ant 

It's not working. 没用 Nothing is happening; 什么都没发生 neither showing any error nor nothing... How do I call ant? 既不显示任何错误也什么都不显示...我怎么称呼蚂蚁?

I need to execute ant compile command from batch file from the current location E:\\work\\CRM . 我需要从当前位置E:\\work\\CRM从批处理文件执行ant compile命令。

Also I set the environment variables for ant: 我也为ant设置了环境变量:

ANT_HOME ANT_HOME
JAVA_HOME JAVA_HOME

  1. Get rid of cmd.exe /k since you're already in a batch file context 摆脱cmd.exe /k因为您已经在批处理文件上下文中
  2. Add -d after ant to show debugging info ant之后添加-d以显示调试信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM