How-to Quick-Start with Ant Java Building Tool on Linux Distros Step-by-Step Easy Guide

March 4th, 2014 by thelinuxevangelist

Java Ant Building Java Projects



The Short Guide Shows You How-to Quick-Start with Ant Building a Hello-World Java Project on Linux Distributions.

Ant is a build tool, a small program designed to help software teams develop big programs by automating all the drudge-work tasks of compiling code, running tests, and packaging the results for redistribution.

Ant is written in Java and is designed to be cross-platform, easy to use, extensible, and scalable.

The Tutorial Include Links to Getting-Started with Ant and Oracle Java JDK 7 on Linux.

Quick-Start Apache Ant on Linux - Featured
  1. Getting-Started with Apache Ant on Linux Distributions:

    Install Ant on Linux
  2. Open Terminal Window
    (Press “Enter” to Execute Commands)

  3. Create a Simple Java Project Instance

    cd [/path/2/javaProject]
    
    nano HelloWorldWithAnt.java
    

    Nano is used because it’s Present by Default on System, so Instead You can just Use Your Editor of Choice…

    Append:

    public class Project 
    {
     public static void main(String args[]) 
     {
      System.out.println("Hello World. I Got Started with Ant!"); 
     }
    }
    
  4. Now Suppose that You Want Ant to:

    1. Build all the Classes on Project
    2. Store the Results in a JAR Archive
  5. Make the Ant build.xml File

    nano build.xml
    

    Append:

    
    
     
      
       Building the .jar file.
      
     
     
     
      
     
     
     
      
     
    
    
  6. How-to Install Recommended Oracle JDK 7 on Linux:

    Install Oracle JDK7 for Linux
  7. To Run the Ant Building Task

    Simply :)

    ant
    
  8. How-to Install Latest Eclipse for Java on Linux Distributions:

    Install Eclipse for Java on Linux
Share on Tumblr

Tags: , , , , , , , , , ,


Comments are disabled