How Do I Create A Jar File Using Ant - Web Tutorials - Pag 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

http://www.avajava.com/tutorials/lessons/how-do-i-create-a-jar-file-using-ant.html?

page=2

Search Tutorials: Go

AVAJAVA Web Tutorials


Total Categories: 24, Total Tutorials: 508
Ant: 11 of 16 tutorials
How do I create a jar file using Ant?

Web Tutorials :: Ant :: 11. How do I create a jar file using Ant?

Tutorial Categories: How do I create a jar file using Ant?


1. Ajax (1) Author: Deron Eriksson
2. Ant (16) Description: This Ant tutorial describes how to use the jar task to build a jar file.

3. Apache Web Server (8) Tutorial created using: Windows XP || JDK 1.5.0_09 || Eclipse Web Tools Platform 1.5.1

4. Bioinformatics (10)
5. Cascading Style Sheets (47) Page: < 1 2 3 >
6. Classes and Objects (14)
7. Database (13) (Continued from page 1)
8. Design Patterns (22)
9. Eclipse (39) If I execute build-jar, I see the following result in the console:
10. Files (62)
11. General Java (69) Buildfile: C:\projects\workspace\team-cakes-utilities\build.xml
build-jar:
12. JSPs (9) clean:
13. Java Basics (11) [delete] Deleting directory C:\projects\workspace\team-cakes-utilities\bin
[mkdir] Created dir: C:\projects\workspace\team-cakes-utilities\bin
14. Linux (23) copy-non-java-files:
compile-jar-classes:
15. Logging (5)
[javac] Compiling 2 source files to C:\projects\workspace\team-cakes-utilities\bin
16. Maven (88) clean-jar:
[delete] Deleting directory C:\projects\workspace\team-cakes-utilities\build
17. Search (12)
[mkdir] Created dir: C:\projects\workspace\team-cakes-utilities\build
18. Servlets (20) jar:
[jar] Building jar: C:\projects\workspace\team-cakes-utilities\build\team-cakes-utilities.jar
19. Struts (1)
BUILD SUCCESSFUL
20. Text (19) Total time: 1 second
21. Tomcat (8)
22. Version Control (8)
In Eclipse's Navigator view, we can verify that our classes were indeed created in our bin directory, and the jar W file
23. Windows (2)
was created and placed in the build directory.
24. XML (1)

We can also open our jar file to verify its contents. I did this and verified that it contained the expected class files. I

21/10/2014 10:41
http://www.avajava.com/tutorials/lessons/how-do-i-create-a-jar-file-using-ant.html?page=2

inspected the MANIFEST.MF file and it contained the expected results.

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.5.0_09-b03 (Sun Microsystems Inc.)
Built-By: TeamCakes
Built-On: 5-May-2007
Built-At: 02:26:20 AM PDT

(Continued on page 3)

Page: < 1 2 3 >

Related Tutorials:

Ant :: How do I create a versioned jar file using Ant?


Ant :: How do I build a war file with Ant?
Ant :: How do I build a versioned war file?

Web Tutorials :: Ant :: 11. How do I create a jar file using Ant?

Copyright © 2014 Code Strategies | Template: Free CSS Templates | Contact

21/10/2014 10:41

You might also like