hello, I have to create a RMI program,when i run this program it will run only few minutes then show "java.lang.outofmemoryError: java heap space" problem. I have to use Window 7 with 1.5 GB RAM and JDK1.6
Thanks,
hello, I have to create a RMI program,when i run this program it will run only few minutes then show "java.lang.outofmemoryError: java heap space" problem. I have to use Window 7 with 1.5 GB RAM and JDK1.6
Thanks,
You may simply need to increase your maximum heap size using the -Xmx option.
You could read this tuning guide
Smells memory leak. Although Java does garbage collection, you still need to make sure you don't hold onto (strong reference) to objects that you no longer need. For example, if you do not unregister event handlers (and event handler boilerplate code holds strong reference to the handlers), those handlers will never be collected and thus memory leak.
Without knowing more of your program, we can just guess here.
Memory leak. Use jvisualvm in the jdk to find out why.
This can be a one of several things.
java -Xms128m -Xmx512m ...