The Software Packager is available as a free download from the Oracle Technet Web site.
Before installing the Software Packager, you must install the Java Developer's Kit, or JDK. The JDK is also free and can be downloaded from Sun's Web site. After you install JDK, you should have no trouble installing the Software Packager.
Once it is installed, you will find the software listed in the same area where you find the Universal Installer. A useful and informative tutorial is included with the Software Packager's documentation.
See the Resource page of this course for links to the Oracle Technet and Sun Web sites.
To deploy EJBs and other components in the J2EE application, you must package them. In keeping with J2EE modular programming methodology, all parts of a module are packaged together. This includes JSP
- images, and
- utility classes
to make that component a self-contained package. JAR files are zipped archives of files ending in the .jar extension. In fact, you can pack and unpack a JAR file with any zip utility.
Java provides a utility for creating archives that has the advantage of creating a Manifest automatically.
By creating an archive of the required class file and other supporting files you package everything into one file. This allows you to deploy applications in one file.
The JAR file maintains the file's subdirectories there by maintaining Java package integrity. Standard JavaBeans and Enterprise JavaBeans, mentioned earlier, are packaged into JAR files.
WAR files are Web Application Archives. WAR files are JAR files that end in .war and are used to package and deploy web components into web containers. They can contain HTML documents, servlets, JSPs, or even applet class files.
WAR archives also contain an XML file called a deployment descriptor
that describes the components. This file is called web.xml.
An EAR file is an Enterprise Archive and is used to package modules of an J2EE application.
An EAR file is a JAR file that ends in .ear and can contain JAR and WAR files in addition to any other file required by the module.
EAR archives also contain a file describing their contents called an application descriptor, typically, application.xml.
As with all zip files, Java archives maintain subdirectories and thus package scope. To create these files manually, you use the Java packager tool called jar.