I wrote the following code to turn a one dimensional array to a 2D array. Whenever I use it for small size arrays it works fine, whenever the array gets too big the code throws a java.lang.OutOfMemoryError: Java heap space
exception.
byte[][] twoD = new byte[(int)Math.ceil(xlArray.length / (double)4096)][4096];
Is it just a problem caused in the IDE as it doesn't have access to enough heap space on the machine or more than that?