Ant This tool is really a tool!
Recently, in learning using struts, the use of Struts resources will be used during use, and this resource file must also convert character encoding with the JDK command native2ASCII. Think up, I often modify the resource file, and then open the console, CD to the resource file directory each time, then execute the native2ASCII -Encoding GB2312? ? It is really a painful experience.
So I decided to use Ant to solve this problem. Let Ant automatically serve me, huh, huh. So lazy me!
Open the ANT document, find Task Exec, is the execution system command, where the DIR parameter is the executable directory, and executable is the execution command, and there is a parameter for executing the command, please refer to the following example:
FILE = "$ {resource} /ApplicationResources_zh_cn.properties"> delete> exec> target> Test it, is it a result: Make Resource: [delete] deleding: E: / my web / jspmyadmin / src / com / guipei / struts / applicationResources_zh_cn.properties Build Successful Total Time: 1 Second Ok, celebrate, Ant has more features that develop services for us, and Ant has more features to learn. This can save us more time, isn't it?