Click to See Complete Forum and Search --> : How to recover OutofMemoryError?


October 5th, 1999, 01:13 AM
Hai friends,

Is it possible to recover from OutOfMemoryError? I am retriving data from files as well as from databases. I am storing all the data in vectors. while creating vectors to store data, i am getting this error. I am getting this error for just 2MB files only. How can i tell to VM to use Virtual Memory?

Please help me if there is any other solution for my problem?

poochi
October 5th, 1999, 10:52 AM
Compile your java sourcefile with the following compiler option ..


-J-Xms32m ( Ex : javac -J-Xms32m MyFile.java )




This will increase maximum size of the memory allocation pool from 16mb to 32mb ( default
value in JDK1.2.1 is 16mb ).