File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes large file support Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "large file support" Watch "large file support" New topic

large file support

Elihu Smails
Ranch Hand

Joined: Jan 12, 2005
Posts: 37
I am researching large file support for Java. I need to know what the largest file that a 32-bit and 64-bit JRE(1.5) can handle. I would think it would be 2GB for a 32-bit JRE and 2^64 for a 64-bit JRE. I understand that the OS must have alot of memory to keep up with the JRE, which is not a problem. But should a 64-bit JRE be able to handle files in the >10 GB range?

PS. This is for SPARC Solaris 10.

Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

I don't think memory availability has anything to do with it. Your question seems to be more about how large a file can a particular operating system handle. And that question really has nothing to do with the number of bits in a typical number, but more to do with the design of the low-level APIs for handling files in that operating system.

However, the File class has a length() method that returns a long value, which cannot exceed 2^63-1. So files larger than that many bytes would not be handled correctly by Java regardless of the underlying operating system.
Elihu Smails
Ranch Hand

Joined: Jan 12, 2005
Posts: 37
Thank you.
I agree. Here's the link:
subject: large file support
It's not a secret anymore!