Archive Builder

The Archive Builder is a feature of JBuilder SE and Enterprise.

Deploying a Java program consists of bundling together the various Java class files, image files, and other files needed by your program, and copying them to a location on a server or client computer where they can be executed. You can deliver the files separately, or you can deliver them in compressed or uncompressed archive files.

JBuilder's Archive Builder assists you in deploying your program. It automatically gathers together classes, resources, and libraries your program needs and archives the files to a compressed or uncompressed ZIP or JAR file. It also creates the JAR file's manifest.

To open the Archive Builder:

  1. Open the project you wish to deploy.
  2. Compile your project to create the class files.
  3. Choose Wizards|Archive Builder.

Note: The Archive Builder always uses the most recently built class files but does not check to see if they are up to date. If you have made changes to your source, be sure to compile your project again before running the Archive Builder.

The Archive Builder and resources

The Archive Builder considers resources to include any files that are not .class files and are located on the output path. By default, JBuilder recognizes all images, sound, and properties files as resources and copies them to the output path when compiling. You can override these default resource definitions by defining your own resources. See "Selective resource copying" for information on defining resource types.

See also:

"Using the Archive Builder" in Building Applications with JBuilder
"Deploying programs" in Building Applications with JBuilder
"Working with applets"
"Step 16: Deploying the Text Editor application to a JAR file" in the tutorial Building a Java text editor.
license.txt in the root directory of your JBuilder installation
deploy.txt in the redist directory of your JBuilder installation

Select an archive type

The first step of the Archive Builder lets you select what type of archive you want to create. Depending on your choice here, different defaults are set and different options are available as you work through the steps of the wizard.

Archive Type

Type Description
Applet JAR An applet archive in the JAR format is compressed by default, giving you the advantage of faster applet download time and less space required by your files on target server or system. An applet archive should include all required classes from imported libraries, so that the applet is not dependent on external files.
Applet ZIP An applet archive in the ZIP format is used for compatibility with older browsers that do not accept JAR files. The ZIP format is compressed by default, giving you the advantage of faster applet download time and less space required by your files on target server or system. An applet archive should include all required classes from imported libraries, so that the applet is not dependent on external files.
Application An application archive is not compressed by default. This improves load time. Application archives typically do not include any portions of their libraries, requiring that you provide the necessary redistributable libraries with your installation. The difference between this option and the Basic option is that an Application archive allows you to select your application's main class and create native executable wrappers for your application.
Basic A Basic archive is not compressed by default. This improves load time. Basic archives typically do not include any portions of their libraries, requiring that you provide the necessary redistributable libraries with your installation. You cannot set the main class or create executable wrappers.
J2EE Application Client A J2EE Application Client JAR contains deployment descriptors that describe enterprise beans and external resources referenced by your application. This is a feature of JBuilder Enterprise.
Native Executable The Native Executable type automatically bundles an application JAR file with native executable wrappers for Windows, Linux, Solaris, and Mac OS X. Note that the JDK is not bundled with the JAR file, so the JDK must be installed on the user's computer in order to run the executable. The Native Executable Builder, available on the Wizards menu and the Build page of the object gallery, is a shortcut to this archive type. See "Using the Native Executable Builder."
OpenTool An OpenTool archive is not compressed by default. This improves load time. As with Basic and Application archive types, OpenTool archives typically do not include any portions of their libraries, requiring that you provide the necessary redistributable libraries with your installation. An OpenTool archive expects you to override the manifest file.
Resource Adapter (RAR) A RAR archive contains connector implementations, such as JAR archives, plus their platform-dependent libraries and documentation. This is a feature of JBuilder Enterprise.
Web Start Applet A Web Start Applet archive (a JAR file) is placed under a WebApp directory so that it can be accessed by a web server. For more information, see "Launching your web application with Java Web Start." This is a feature of JBuilder Enterprise.
Web Start Application A Web Start Application archive (a JAR file) is also placed under a WebApp directory so that it can be accessed by a web server. For more information, see "Launching your web application with Java Web Start." This is a feature of JBuilder Enterprise.