![What phone has the best camera 2015](https://cdn2.cdnme.se/5447227/9-3/screenshot_4_64e629479606ee5be4b9a969.jpg)
![check apache ant check apache ant](https://javeedmeandadblog.files.wordpress.com/2018/02/antscript.png)
# jar cvfm build/jar/test.jar mymanifest -C build/classes/. # echo "Main-Class:test.TestApp" > mymanifestĬreate a JAR file now. To create a JAR, we need to create a JAR manifest for our Java Project. Since, our application is running fine, we can now create a JAR file from compiled classes.
![check apache ant check apache ant](https://examples.javacodegeeks.com/wp-content/uploads/2017/09/debug-option.jpg)
# javac -sourcepath src -d build/classes src/test/TestApp.java ("Testing Apache Ant.") Ĭompile TestApp.java and check for any possible errors. # vi src/test/TestApp.javaĪnd write some Java code here. # cd TestAppĬreate a file in src/test directory. TestApp.īuild/classes directory is used for place the compiled Java classes.īuild/jar directory is used to generate JAR (Java Archive) from the compiled Java classes.Ĭheck the directory structure. Src/test directory is used for keeping the source code of our Java Application i.e. Let's create required directory structure for our project. We will first create a simple Java application and then compile and build the JAR by using Java commands. # yum install -y antĪpache ANT requires Java Development Kit (JDK) therefore, it has installed the available version of OpenJDK from yum repository. Install Apache ANT package with yum command.
![check apache ant check apache ant](https://is5-ssl.mzstatic.com/image/thumb/Publication113/v4/7d/e2/f8/7de2f80e-07ff-d9c3-f2fc-e54fe363b1c5/source/700x700bb.jpg)
We are using a Linux machine with following specification. In this article, we will install Apache ANT on RHEL/CentOS 7 machine and create a build.xml file to compile and build a simple Java application.Īpache ANT does not have any special system requirements. The same build.xml file can be used on any platform to build the Java application. It uses a XML file build.xml to create script for the build process. It is mostly used by open source community to compile and build Java applications. Apache ANT (Another Neat Tool) is a Java Library and Command-line tool to automate software build processes.
![What phone has the best camera 2015](https://cdn2.cdnme.se/5447227/9-3/screenshot_4_64e629479606ee5be4b9a969.jpg)