I am running a java application using this command java -classpath %CP% -Xmx264m -Xms128m com.MyProg The program involves operations like copying a large no image files,updating DB etc.
In my desktop , it is running fine . But in another machine , it shows "Exception in thread "main" java.lang.OutOfMemoryError" The RAM size is same in both , virtual memory is also same Can anybody suggest what may be the possible reason .
I had the problem when loading large projects because I allways opened new Statements to the database (and forgot to close them) instead of re-using existing Statements.
It never happened on my machine since for testing purposes I never used large projects.
Make sure to close open Statements once they are not needed anymore.