Thursday, 27 February 2014

Create,Delete and Compile by ANT build file.(Ant Part-3)

In our last post we have seen 
Now we will see some core task which can be performed by using ant such as create a folder or delete folder and to compile the java source.If till now you have not got 1% idea about ANT don't worry it is not needed also just check the below XML build file.

<?xml version="1.0"?>
<project name="MyfirstAnt" default="main" basedir=".">
  <!-- Sets variables which can later be used. -->
  <!-- The value of a property is accessed via ${} -->
  <property name="create.dir" location="D:/MyAnt/NewFolder" />
  <property name="delete.dir" location="D:/MyAnt/OldFolder" />                  
  <!-- Deletes oldFolder from the path delete.dir-->
  <target name="cleanFolder">
    <delete dir="${delete.dir}" />
  </target>

  <!-- Creates a newfolder on the path create.dir-->
  <target name="makefolder">
    <mkdir dir="${create.dir}" />
  </target>

  <!-- Compiles the java code (including the usage of library for JUnit -->
  <target name="compile" depends="cleanFolder, makefolder">                 <javac srcdir="${src.dir}" destdir="${build.dir}">
    </javac>

  </target>
  <target name="main" depends="compile">
    <description>Main target</description>
  </target>

</project> 

Here we have written three tasks first is to delete a particular folder from file system  the path which you will give in dir attribute it will clean the particular folder means it can be used to clean the class files before building .

Second task is to create a folder so you can create any folder in file system it can be temp .

and last task is to compile the the java source files here we have to give the source path of java files and destination folder where you have to keep the class files you can also set class-path for proper compilation which we will discuss in our coming posts.



#hemant #kurmi 
#hemant #kurmi #hemant #kurmi
#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant#hemant #kurmi #hemant #kurmi #hemant #kurmi
#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi#hemant #kurmi

Hemant kurmi 

You may also like:-

Using JConsole in java And creating memory dump by it

Heap analysis by Memory Analyzer (MAT) - Eclipse java

Main causes of Out-Of-Memory Errors in java

Five main types of Memory leaks in java

How to Reduce Garbage-Collection Pause Time?

4 Mains causes of Long Garbage Collection Pause?


How Application Performance get impacted by Garbage Collection?


Java Performance Tuning options Java heap


Why Memory leak in Java ?


What is a Memory Leak in java?


What is Garbage collector in java and how it works?


What is Garbage Collector Compaction in Java?


What are Java heap Young, Old and Permanent Generations?


What is difference between Web Server and Application Server ?


What is the maximum ram for 32 bits and 64 bits computer?


Some Amazing fact about memory (petabyte,exabyte,zettabyte) And How much data exists on the Web?

1 comment:

  1. Harrah's casino in Maricopa - JTM Hub
    Harrah's is located in 울산광역 출장마사지 Maricopa, งานออนไลน์ Arizona, a 20-minute walk from Maricopa Casino 평택 출장샵 and the 상주 출장샵 Maricopa Hotels. It's 군산 출장안마 also close to Caesars Palace,

    ReplyDelete

Hemant Kurmi - 2021 - Some Amazing Facts About Memory: Petabyte, Exabyte, and Zettabyte

Some Amazing Facts About Memory: Petabyte, Exabyte, and Zettabyte As technology advances, our ability to store and process data has grown ...