Last revised: 26 Feb 2000
THIS IS UNOFFICIAL DOCUMENTATION.
IT MAY CONTAIN ERRORS.
USE AT YOUR OWN RISK.The following descriptions include ONLY the JBindery-specific resources. There are other resources in the file which are required for the program to run, such as 'ALRT' and 'CODE' resources. Those resources are not described here.
These descriptions are for JBindery 2.1 and 2.2. Earlier JBindery versions use fewer of these resources, but the same format when used. For example, JBindery 2.0 doesn't support the 'PPTH' resource, but its 'CPTH' resource is exactly as described here.
I do not have resource-editor templates for these resources. I do have a preliminary set of Rez templates for most of them, to the extent possible (i.e. alias-records not supported). These are unsupported. Use at your own risk.
The Resource Types and Formats
- 'CPTH' 0 -- class-path of places that follow "built-ins" from $CLASSPATH.
int16: count of following entries; each entry padded up to 2-alignment. entry: contains... int16: unaligned length of variable part of entry-data OSType: entry type -- 'url ' for URL, 'alis' for file or directory. variable: a URL byte-string, an alias-record, etc. align: align so next entry is at 2-byte boundary (0 or 1 byte fill)When a VFS is in the class-path, it's a URL-type entry, typically "file:///$VFS" (see below). I had one report that JBindery expects a URL byte-string to be NUL-terminated, though I have not observed this to be the case myself. Your actual mileage may vary.
- 'PPTH' 0 -- class-path of places that precede "built-ins" from $CLASSPATH.
Same format as 'CPTH' resource.
- 'gchu' 0 -- GC heap-size limits (MRJ 2.2 only).
int32: min limit, in bytes int32: max limit, in bytesA value of 0 means that the limit-check is disabled for that particular limit, or that a default applies.
- 'GROW' 0 -- Grow-box intrusion control.
int16: flag indicating whether grow-boxes intrude (1) or not (0)
- 'merg' 128 -- JBindery info about which resource-file to merge.
Apparently an 'alis' resource (alias-record). Not needed to run the Java program.
- 'PARM' 0 -- command-line args, same format as 'STR#' resource-type.
int16: count of following entries (0 if no command-line args). entry: P-StringThe P-String is a count-byte followed by string-bytes, neither aligned nor padded. In JBindery 2.1, parsing into distinct args occurs at spaces, regardless of quoting. That is, quoting is not supported by JBindery 2.1. JBindery 2.2 may support quoting, I haven't checked. Obviously, if you're assembling your own P-Strings, you can have all the embedded blanks and unescaped quotes that your heart desires. Just be careful if there's a possibility that JBindery 2.1 could munge them all together and reparse with its own idea of words separated by white-space.
- 'PROF' 0 -- profiler control.
int16: flag indicating whether to profile (1) or not (0).Only recognized by MRJ 2.1 or higher.
- 'PROP' 0 -- properties list.
The format is similar to 'STR#' resource type, but the initial count represents the number of PString PAIRS, not individual PStrings. The first PString of each pair is the property-name, the second is the property-value. An empty property-value is an empty PString, i.e. a single count-byte of 0. It's possible that empty property-names are allowed, but you'll have to try it if you want to find out.
- 'SIOX' 0,1 -- console control (stdin and stdout).
Res-ID 0 is stdout, res-ID 1 is stdin. Format is:int16: unknown, always observed to be 0x0001. OSType: 'WIND' for window, 'null' for null, 'ALIS' for file-alias. bytes: depends on preceding OSType.The 'bytes' portion only appears to be needed for the 'ALIS' type, in which case it appears to be an alias-record. Didn't investigate distinction between replace and append modes of output-to-file.
- 'SSEC' 0 -- unknown, maybe security/proxy info?
- 'STRT' 0 -- C-formatted, NUL-terminated name of startup class. NOT a P-string.
- 'vfso' 128 -- probably VFS name.
Partial format:int16: 0x0001 int16: 0x0001 pstr[255]: "$VFS"Any non-zero bytes after "$VFS" don't seem to be needed for the program to run. Since my initial explorations, I've learned that JBindery 2.1 didn't erase things first, while JBindery 2.2 does. So zero-filled is the correct behavior, or so it seems.Conceivably, the string in the 'vfso' resource could be set to anything, as long as it matched the corresponding CPTH/PPTH entry-item and the name used in the ZIP-formatted VFS data-fork. I have not tried this, so it may not work due to some quirk of MRJ or the launcher code.
Note that a saved VFS'ed app has its class-path entry magically changed to the 'url ' type, with a name-string of "file:///$VFS". Also note that the ZIP-entries in the VFS are all of the form "/$VFS/...", with a leading slash.
- 'vfss' 128 -- source info from which VFS is built.
This may be an alias-record resource. If so, it seems to need to be related (though not identical) to the corresponding 'alis' entry-type in the class-path. That 'alis' entry will have been magically changed to a 'url ' entry with a name of "file:///$VFS", so maybe the 'vfss' resource is just a special holding-place for the original class-path entry's alias-record data. My simple testing indicates that the 'vfss' resource is probably not needed in order for the Java program to run, but is certainly needed in order for JBindery to rebind to a VFS'ed app. Your actual mileage may vary.
- 'wctb' 128 -- window background color.
The color whose part-code is "content color" is the "Window background color" under the "Appearance" tile in JBindery. Unknown if other colors have any effect. Also, I think that MRJ's starting with 2.1 don't rely on this color, but instead use the background color set in the Java code itself. Or I could be completely wrong.
- '¬jit' 0 -- A flag to disable JITC. (MRJ 2.2 only)
int16: 0x0100 to disable; omit resource to enable.That's the MacRoman character 0xC2 (Option-L, lower-case, no SHIFT) as the first character of the resource-type.
- Data-fork -- The VFS itself.
ZIP-formatted uncompressed VFS under the directory-name "/$VFS". Possibly created without CRC's, so possibly unreadable by picky ZIP-utilities (StuffIt Expander, ZipIt, etc.?). Class Wrangler handles the data-fork just fine, though -- but it doesn't require CRC's. Your actual mileage may vary. If you don't have any other ZIP-file library, you can try using the Java classes in "java.util.zip".
To Greg's Home Page
To Greg's Software Page