Java Ant Building Java Projects
The Short Guide shows you How to Quick Start with Ant Building a Hello-World Java Project on GNU/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.
-
Getting-Started with Apache Ant on GNU/Linux Distributions.
-
Open Terminal Window
(Press “Enter” to Execute Commands). -
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!"); } }
- Build all the Classes on Project
- Store the Results in a JAR Archive
-
Make the Ant build.xml File.
nano build.xml
Append:
Building the .jar file. -
To Run the Ant Building Task.
Simply :)
/nant
Now Suppose that you Want Ant to:
How to Install Recommended Oracle JDK on Linux:
How to Install Eclipse for Java on GNU/Linux Distributions