Main JAR Packager Native JFC Technical Support What's New dbDE


JAR Packager Readme - Version 3.1.3


1. Overview of features.
2. JAR Packager options.
3. Files generated by the JAR Packager.
4. Known Bugs.
5. What to do about bugs.
6. Recent bug fixes
7. General Issues


1. Overview of features

Here is a basic description of the JARing process.

1. The project is built
2. The JAR Packager is invoked.
3. It calls sj -depend x.dar on your Java source files to determine the dependencies.
4. If you selected JAR... the dependencies are displayed. If you selected Auto JAR goto step 12. Auto JARing selects the checkbox in step 11 to true.
5. For non-java files that are part of your project (eg: .gif) the package is guessed based on your CLASSPATH.
6. You can exclude seelected files via the Remove Files button.
7. You can remove entire JAR/ZIP files or entire packages as well as recover removed files via the Manage Files... button.
8. You can set what classes are Java-Beans or Design-Time-Only via the check boxes (see the Java Beans spec at http://www.javasoft.com for more info).
9. You can set the Depends-On clause for each entry as required via the Manage Dependencies... button (see the JAR spec at http://www.javasoft.com for more info).
Depends-On: should be used for any dynamically loaded classes or any resources (resource bundles, images, etc).
11. If you are creating a JavaBean that you want added to the Visual Cafe Component Library you should select the Add To Library checkbox.
12. Once you have set up your JAR the way you want you can press OK and the JAR will be created.

4a. If you are creating a Debug build then, by default, all dependent files that are in archive (JAR/ZIP) files are not included in the JAR. This can be over-ridden with the IgnoreArchivesInDebug.

4b. If you are creating a Final build then, by default, all dependent files that are in archive (JAR/ZIP) files are included in the JAR. This can be over-ridden with the IgnoreArchivesInRelease.

4c. If you are using Swing classes and you are including files from archives (4a, 4b) some additional steps are performed:
4c.1. if you have the Swing.include flag set to false then no Swing classes are included. Goto step 5.
4c.2. if you selected Project|Auto JAR goto 4c.4
4c.3. if you have the Swing.promptForLAFs flag set to true a dialog is shown allowing you to select the Look And Feels to include in the JAR. Goto 4c.6
4c.5 if you have the Swing.promptForLAFs flag set to false the Swing.defaultLAFs Look And Feels will be selected.
4c.6 the selected Look And Feels are added to the dependency list.


2. JAR Packager options

The JAR Packager has a number of configurable options. At the moment you must configure the options by hand - We are working on a way to set these through the JAR Packager GUI.

***IMPORTANT***
The following directions are case sensitive. If you do not enter the information with the exact case given the Options will not work.
***************

If you are using Visual Cafe 2.1
- Copy the sample Bundler.properties file to the VisualCafe\java\lib directory.
- This will give you :

VisualCafe\java\lib\Bundler.properties


You can get a list and description of the options by going to a DOS prompt and typing :

java symantec.itools.vcafe.Bundler -options


You can get the current settings of the options by going to a DOS prompt and typing :

java symantec.itools.vcafe.Bundler -settings


To set a particular option (eg: Debug) all you need to do is edit the Bundler.properties file appropriately.
For example, to set the Debug option you would add the following line to the Bundler.properties file:

Debug=true


You do not need to provide settings for each option. If you do not set a value (or do not provide a Bundler.properties file) the JAR Packager will use the default for all unset options.

Description of options:

A default Bundler.properties file is included please look at it for explanations of the options.


3. Files generated by the JAR Packager

The JAR packager always generates the following files:

- <projecctname>.bundler
A serialized file used for storing options (like the JAR Name, compression, etc) between runs.

The JAR Packager can keep some other files around (by using the KeepFiles flag):

- bundler.rsp
The files passed to the compiler to compute the dependencies.

- bundler.dar
The list of dependencies


4. Known Bugs

- If you get an error saying that the JAR Packager cannot calculate the entries and to make sure that your project is buildable do the following:

- Project|Build
- if that is successfull then look for any warnings in the output window
- either fix the warnings or turn the TestSJOutput to false
- Abstract Classes with BeanInfo files are marked as JavaBeans - this will cause a warning on introspection.
- Given:

package1.X.class
package1.XBeanInfo.class
package2.X.class

Both package1.X and package2.X are marked as Beans.


5. What to do about bugs

If you encounter a bug in the JAR Packager please follow the directions in the "Technical Support" section unless the Bug is an "Internal Exception" dialog.

If you get an "Internal Exception" Dialog please do the following:

- Turn off the JIT (Just In Time compiler) (add JAVA_COMPCMD=DIS to the VisualCafe\bin\SC.INI file)
- Re-start VisualCafe
- Turn on the Debug option (Debug=true)
- this will generate a C:\Bundler.log (you can change the name of this file via the "DebugLog=" option).
- Post the ***ENTIRE*** contents of the DebugLog file to the symantec.support.devtools.windows.vcafe4java.Deployment newsgroup.



6. Recent Bug Fixes

- Improved Swing support.
- IgnoreArchives flags for Debug/Final builds.
- Some errors that were not getting logged now are.
- Added TestSJOutput flag.
- Fixed bug with a space in the output dir.
- Sped the JARing up from the slowdown in 3.0.0.

7. General Issues

Dynamically loaded classes forName(...); getResource(...); getBundle(...) do not show up as JAR entries; you must add them manually. Adding them to the project will then allow the JAR Packager to add them.

There is a bug in the JDK that results in corrupt JAR entries being created in compressed JARs. If you get a Cannot Find File error message when creating a JAR, you may be able to fix it by uncompressing the JAR that you are getting the class from and re-JAR'ing it without compression.

When entries are coming from another JAR that have Depends-On clauses the dependent classes will also be pulled into your JAR. However, the dependent classes will not be marked as dependents of the entry.

When creating a JAR from a project, you should not create a JAR that has the same name as a JAR that is referenced outside of your project. For example: If you are using a SpecialGrid in c:\SGRID.JAR from a third party vendor in your project, do not create a JAR with the name of c:\SGRID.JAR.