Section E.20. Creating a .jar File

   

E.20 Creating a .jar File

A .jar file (Java Archive) uses the same algorithm as a Zip utility does to compress numerous documents into one archive document. The benefit of a .jar file is that the developer can combine HTML, applets, class files, images, sounds, and everything else that makes up an application and put them all into a .jar to facilitate easy distribution of the application. The .jar tool is a Java application tool, regularly available with the SDK.

To create a new .jar :

  1. Navigate to the directory in which you want to create the .jar

  2. Type at the command line: jar cf myJar *.class

To add all of the files in a particular directory to the .jar :

  1. Navigate to the directory in which you want to create the .jar

  2. Type at the command line: jar cvf myApp.jar


   
Top


Java for ColdFusion Developers
Java for ColdFusion Developers
ISBN: 0130461806
EAN: 2147483647
Year: 2005
Pages: 206
Authors: Eben Hewitt

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net