How to recover OutofMemoryError?
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?
Re: How to recover OutofMemoryError?
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 ).