Archive Builder

This is a feature of JBuilder Professional 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 can also create the JAR file's manifest file.

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:

"Archiving MIDlet suites" in JBuilder MobileSet Developer's Guide
"Using the Archive Builder" in Building Applications with JBuilder
"Deploying programs" in Building Applications with JBuilder
"Working with applets" in the Web Application Developer's Guide
"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. Additionally, uncompressed JAR files are smaller files than compressed JAR files. 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.
Basic A Basic archive is not compressed by default. This improves load time. Additionally, uncompressed JAR files are smaller files than compressed JAR files. 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.
Documentation A Documentation archive includes all files and directories on the project documentation paths. A Documentation archive is not compressed by default. This improves load time. Additionally, uncompressed JAR files are smaller files than compressed JAR files. You can create Javadoc with JBuilder's Javadoc wizard. See "Creating Javadoc from API source files."
MIDlet

A MIDlet archive is used to build a MIDlet Suite. A MIDlet Suite is similar to a basic archive in that it contains a JAR file, but it has special attributes in the manifest and an extra JAD (Java Application Descriptor) file. The JAD file is automatically created with the same name as the MIDlet archive, and includes some of the information that is in the manifest file, plus additional information such as any MIDlet parameters. MIDlet archives typically do not include any portions of their libraries, requiring that you provide the necessary redistributable libraries with your installation. A MIDlet archive is compressed by default.

Note: You can press Finish on any step of the wizard to have it automatically generate default information for the JAD file and JAR manifest file. When the MIDlet Archive Type is selected, a separate thread is launched in the background to collect information from the project files. If Finish is pressed before the background thread has not finished collecting the needed information, a dialog box will prompt you to cancel or resume the operation.

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.
OpenTool An OpenTool archive is not compressed by default. This improves load time. Additionally, uncompressed JAR files are smaller files than compressed JAR files. 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 excepts 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.
Source A Source archive contains all Java source files and currently configured resource types on the project source paths. Resource types are configured on the Build page of Project Properties (Project|Project Properties). A Source archive is not compressed by default. This improves load time. Additionally, uncompressed JAR files are smaller files than compressed JAR files.
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."
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."