View RSS Feed

My Java Tips

  1. Simple Ant script

    by , 11-19-2011 at 05:49 PM (My Java Tips)
    Let us see how to write a simple ant script for a Java application. Write a simple HelloWorld Java class


    HelloWorld.Java
    Java Code:
    public class HelloWorld
    {
     	public static void main(String args[])
      	{
       		System.out.println("HelloWorld!");
      	}
    }
    By default Ant uses build.xml as the name for a buildfile. This is the build.xml.
    Java Code:
    <project default="compile">
    
      	<target name="compile">
    ...
    Categories
    Ant