JAVA objects are constrained to work within a fixed memory allocation defined at startup. Unlike many other programs, which can "reallocate" memory on demand, JAVA is therefore resource limited and your application (e.g. OASIS) can start to thrash or even lock up if too much data is read into memory.
Great pains have been taken to optimize OASIS to work in this environment. Memory exceptions are trapped and (providing there is enough memory available to avoid gridlock) result in an error message and memory cleanup.
This mechanism is not foolproof and lockups can occur. The only way to avoid this is to have JAVA start with a large enough memory allocation to hold all the data it will be given. However, since JAVA allocations deal in real (not virtual) memory the user is still limited by the physical memory on the machine.
JAVA installations often come with a ControlPanel class and/or script which provides a mechanism for setting memory (and other configuration parameters).