Monday, February 2, 2009

Why Does My Testical Go Up Into My Abdomen



Level: Intermediate

ANT is a tool used when doing a project programming and must be repeated repetitive tasks such as compilation and construction. Ant is written in Java and is very similar to Make, but with the advantages of being platform and not dependent on the operating system instructions, but is configured with XML files. ANT is an open-source project of the Apache Software Foundation.

OK to start using ANT, the first thing to do is download page for apache can write to google ANT and will be one of the first results, but here's the link:

http://ant. apache.org / bindownload.cgi

Once you've downloaded ANT, unzip the arcihvo, go to the / bin and add that directory Computer to PATH, so in this way, you can easily call and not have to type the complete path from the command line. You probably have some problems with the name of the folder, points and hyphens, what I did was change the name of the folder and so I was so PATH: C: \\ ant \\ bin. Also you need to have at least Java 1.4. Finally, to verify that you did well written in a command line (MS-DOS). Ant-version

And if you set it then you'll see information about the version of Ant you've downloaded, but is properly configured will tell you that ant is not a recognized command.

Well, now if we are to use the ANT: D. As I mentioned ANT is a tool for processes that need to be repeated many times when we are developing a project, how for example be compiled and we have a good organization directories, and we want to separate our source files already compiled. And also will automatically generate a jar to run.

ANT To all we have to do is create an XML configuration file which will contain instructions that is what we do. In ANT we have set a target, which is next to be executed and then the tasks that we want to do when you select that goal. Well to start, we will establish a new project, create a folder called introduccionant, and that will put two files:

HolaMundo.java (The file that we compile and run with ant) \u200b\u200bbuild.xml
(The configuration file ANT)

HolaMundo.java
 public class HelloWorld {public static 

void main (String [] args) {

System.out.println ("Hello World");}





} build.xml

 

basedir = "."
default = "compile">


debug = "true"
deprecation = "false"
optimize = "false"
FailOnError = "true">






first define a project, give it a name, we put the base directory, in this case is the same and we are putting the "." and Target which by default will run is to build name.

After that we must define the target, which has compiled name (the default) and then placed the tasks we perform, in this case we just want to call javac to compile files, our target directory will be the same and also put some additional options. Also when using javac, it is imperative that we have defined where the source files that define the source directory also in this case and for simplicity is also the same.

Now all you have to do is go to a command line introduccionant go to the directory and run the command:

ant

After this the result will say that the build has been successful and those who have used NetBeans, see the console output is equal to the IDE, this is because NetBeans uses Ant to do the build of our projects. And if you go to the directory using Explorer you will see your file. Class has been created and can write in the command line:

java HelloWorld

Linea de Comandos con Ant

Well with that we our first program compiled using ant, now all you have to do is add more options to our build.xml file so we can get more done using ANT.

Greetings

0 comments:

Post a Comment