Microsoft SDK for Java

Q232638 PRB: Java Distribution Units Need Lots of Disk Space to Install

The information in this article applies to:

SYMPTOMS

Java Distribution Units (.cab files that are installed into the Java Package Manager) require a lot more disk space during the installation on FAT systems when compared to NTFS or FAT32 systems.

Because of this drives formatted as FAT that are low on disk space have a higher chance of running out of space during the .cab download and install process. The end result is a failed .cab installation, which unfortunately is usually silent, presenting no error messages to the user. Here are some symptoms of this problem:

CAUSE

More temporary disk space is required on a hard disk formatted as FAT (as compared to NTFS or FAT32) when downloading and installing the same Distribution Unit (DU).

DU .cab files download into a temporary directory. As an intermediate step, all of the files inside the .cab archive get extracted to temporary space on the hard disk. Finally, all the extracted files get re-packaged into a ZIP file that resides in your %Windir%\java\packages directory (where %Windir% is the client's Windows directory).

If the drive has a large cluster size (such as drives formatted as FAT), each file will temporarily take up more space before it is recompressed into a ZIP file. Since Java DUs typically contain hundreds (or possibly thousands) of small class files, the cluster size can cause a relatively small DU to require a huge amount of temporary hard disk space.

RESOLUTION

The easiest resolution is for the user to free up some disk space and try the download or install again. To be safe, ensure that the hard disk where Windows is installed has at least 200 MB of free disk space.

Developers can minimize the impact of this problem on their users by breaking up each DU into smaller DUs. That way the temporary disk space required by each DU is smaller.

MORE INFORMATION

Example

NTFS and FAT32, by default on a 3 gigabyte (GB) partition, use a 4 kilobyte (KB) cluster size (512 byte sector * 8 sectors). FAT, by default will use a 64 KB cluster size (512 byte sector * 128 sectors).

Note   A cluster consists of one or more 512 byte sectors and each file consumes one or more clusters (always rounded up).

Therefore, on a 3 GB hard disk with a .cab file consisting of five files (where these file are 0.5 KB, 1 KB, 2 KB, 5 KB, 10 KB, 75 KB, respectively):

File Size NTFS FAT
500 bytes 1 cluster 1 cluster
1 KB file 1 cluster 1 cluster
2 KB file 1 cluster 1 cluster
5 KB file 2 clusters 1 cluster
10 KB file 3 clusters 1 cluster
75 KB file 19 clusters 2 clusters
  27 clusters 7 clusters

Total Space needed to decompress .cab file:

NTFS: 27 clusters * 4 KB/cluster = 108 KB

FAT:  7 clusters * 64 KB/cluster = 448 KB

Note   The above example uses only six files. If a .cab archive contains hundreds or even thousands of Java class files, it is fairly easy to run out of disk space on a FAT system.

REFERENCES

For more information on file systems, see the following articles in the Microsoft Knowledge Base:

Q101267 Files Are Larger on FAT Partitions

Q140365 Default Cluster Size for FAT and NTFS

Q192322 Description of Default Cluster Sizes for FAT32 File System

Q100108 Overview of FAT, HPFS, and NTFS File Systems

For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, please see the following pages on the Microsoft Technical Support site:

http://support.microsoft.com/support/visualj/ This link takes you to a site on microsoft.com

http://support.microsoft.com/support/java/ This link takes you to a site on microsoft.com

Additional query words:

FAT NTFS FAT32 disk space VM .cab DU VJ

© 1999 Microsoft Corporation. All rights reserved. Terms of use.