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”

239 total views, 0 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:

763 total views, 0 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. 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

235 total views, no views today

» Read more