PRB: Java Distribution Units Need Lots of Disk Space to Install on a FAT System

ID: Q232638


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 drive 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 drive 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/

http://support.microsoft.com/support/java/

© Microsoft Corporation 1999, All Rights Reserved.
Contributions by Brett Siedman, Microsoft Corporation

Additional query words: FAT NTFS FAT32 disk space VM CAB DU VJ


Keywords          : kbIE400 kbIE401 kbSecurity kbVJ600 kbVS600 kbIE401sp1 kbIE401sp2 kbGrpJava kbVS600sp2 kbSDKJava310 kbVS600SP1 kbVS600sp3 kbIE500 kbSDKJava320 
Version           : WINDOWS:3.1,3.2,4.0,4.01,4.01 SP1,4.01 SP2,5.0,6.0,6.0 SP1,6.0 SP2,6.0 SP3,6.0 sp1, sp2, sp3
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: July 27, 1999