C:\CABDIR\DIAMOND /F FIRSTCAB.DDFThis assumes you installed the Cabinet Development Kit in C:\CABDIR.
If you have not installed the Cabinet Development Kit, you can find it on the CD in the \CAB&SIGN directory.
Return to the top of this article.
Create a .DDF file with the following lines in it:
.OPTION EXPLICIT .Set CabinetNameTemplate=CABNAME.cab .Set DiskDirectoryTemplate= .Set Cabinet=on .Set Compress=on .Set ReservePerCabinetSize=6144 CLASSNAME.class CLASSNAME.classwhere CABNAME is the name of the CAB file to be created (in this case, FIRSTCAB.CAB), and CLASSNAME entries form a list of the files to include in the CAB file (in this case, javabeep.class).
Save this file in the project directory. Give it some descriptive name. It will simplify maintenance if the name of the DDF file is the same as the name of the CAB file it describes. Use the file extension .DDF.
As you add classes to this project, add them to the list at the bottom of the DDF file.
As you see, working with CAB files is quite simple once you get used to creating them. In fact, they are very convenient. A CAB will download faster than the individual files because the files in the CAB are in a compressed format. Also, multiple class files can be packaged together into a single CAB file. This also increases efficiency, since packaging multiple class files for an applet as a single CAB file decreases the number of network-access operations needed to download the applet.
Return to the top of this article.