Apache Ant Hello World
To create a simple hello world project, we are using Eclipse IDE and the project require the below steps.
- Create a Java Project
- Create a Java File
- Create an XML File
- Create a Folder
- Run as Ant Build
package com.learnhowtocode;
public class Hello {
public static void main(String[] args) {
System.out.println("Hello learnhowtocode");
}
}
<?xml version="1.0" encoding="UTF-8"?>
<project name="java-ant project" default="run">
<target name="run" depends="compile">
<java classname = "com.learnhowtocode.Hello">
<classpath path="test"></classpath>
</java>
</target>
<target name="compile">
<javac includeantruntime="false" srcdir="./src" destdir = "test"></javac>
</target>
</project>
0 comments:
Post a Comment