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



The information in this article applies to:

  • Microsoft Visual J++ 6.0
  • Microsoft SDK for Java 3.1
  • Microsoft SDK for Java 3.2
  • Microsoft Internet Explorer (Programming) 4.0
  • Microsoft Internet Explorer (Programming) 4.01
  • Microsoft Internet Explorer (Programming) 4.01 SP1
  • Microsoft Internet Explorer (Programming) 4.01 SP2
  • Microsoft virtual machine

This article was previously published under Q232638

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:
  • Java applets installed into the JPM do not run after they are downloaded.
  • No Java applets run on a particular computer after upgrading the Microsoft virtual machine (Microsoft VM). Note that the user may not be aware that the Microsoft VM was upgraded.
  • When installing Visual Studio, Setup keeps prompting the user to install the Microsoft VM and reboot (even though it already performed this step).

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 SizeNTFSFAT
500 bytes1 cluster1 cluster
1 KB file1 cluster1 cluster
2 KB file1 cluster1 cluster
5 KB file2 clusters1 cluster
10 KB file3 clusters1 cluster
75 KB file19 clusters2 clusters
27 clusters7 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:

101267 Files Are Larger on FAT Partitions

140365 Default Cluster Size for FAT and NTFS

192322 Description of Default Cluster Sizes for FAT32 File System

100108 Overview of FAT, HPFS, and NTFS File Systems

For support information about Visual J++ and the SDK for Java, visit the following Microsoft Web site:

Modification Type:MajorLast Reviewed:6/14/2006
Keywords:kbFAQ kbprb kbSecurity KB232638