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,
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.