I have a big file, it's expected to be around 12gb. I want to load it all into memory on a beefy 64bit machine with 16gb ram, but I think Java does not support byte arrays that big:
File f = new File(file);
long size = f.length();
byte data[] = new byte[size]; // <- does not compile, not even on 64bit JVM
is it possible with Java?
The compiler error from the Eclipse compiler is :
Type mismatch: cannot convert from long to int
javac gives:
possible loss of precision
found : long
required: int
byte data[] = new byte[size];