There is no specific maximum file size supported by Java, it all depends on which OS you are running. 100 megabytes will not be a problem, even on a 32-bit OS.
You did not say whether you want to immediately read the entire file in memory. You may find that you need to process only part of the file at a time. For example, a text file can process a string at a time, so there is no need to download the entire file. Just read the line at a time and process each.
If you want to read the entire file into one block of memory, you may need to change the default heap size for your JVM. Many JVMs have a default value of 128 MB, which is probably not enough to download your entire file and still have enough space for other useful things. Check the documentation for your JVM to find out how to increase heap size distribution.
source share