‘ant’ is not recognized as an internal or external command, operable program or batch file.

Root cause: Ant path has not been set. So windows could not recognize ant command. Solution: Set the ant path in cmd like this, Note: Jdk must be installed. Thanks for reading this post………..!!! 452 total views, 6 views today

452 total views, 6 views today

» Read more

Ant Hello world

Step 1: Create a folder named “ant build”  and get into that. Step 2: Create a “build.xml” file inside “ant build” folder and copy the below code,  Build.xml: <project> <target name=”clean”> <delete dir=”build”/> </target> <target name=”compile”> <mkdir dir=”build/classes”/> <javac srcdir=”src” destdir=”build/classes”/> </target> <target name=”jar”> <mkdir dir=”build/jar”/> <jar destfile=”build/jar/HelloWorld.jar” basedir=”build/classes”> <manifest> <attribute name=”Main-Class” value=”agn.Hello”/> </manifest> </jar> </target> <target name=”run”> <java jar=”build/jar/HelloWorld.jar”

104 total views, 1 views today

» Read more

Ant (configuration and My First Ant)

Step 1: Set the environment variables as follows, Start -> My Computer -> Rightclick on it and click properties -> Advanced System Settings-> Advanced -> Environmental variables -> create new on the user variables and type, 1. Variable Name: JAVA_HOME Variable value: jdk path.(say C:\Program Files\Java\jdk1.7.0) 2. Variable Name: ANT_HOME Variable Value: Ant path (say C:\Apache Ant 1.7.1) 3. Variable Name: Path Variable Value: Ant path;Jdk path (say C:\Apache Ant 1.7.1\bin;C:\Program Files\Java\jdk1.7.0\bin;) Note:

642 total views, no views today

» Read more

Ant Installations and Configurations

Step 1: Before installing ant ensure that already java has been installed in your system. Step 2: Go to the below link and download the ant. http://ant.apache.org/bindownload.cgi Step 3: Just extract the zip file you downloaded and put in the drive you want. Step 4: Now go to the command prompt and type ant then you will get like as follows, Step 5: Now we

77 total views, 1 views today

» Read more