I'm presuming you're talking about OS 8 or 9 right? You didn't specify so it's hard to know what operating system version you're talking about.
Make sure you have the last version of Java for OS 9: MRJ 2.2.6 for OS 9.2.2
http://docs.info.apple.com/article.html?artnum=120209 (previous Java from here MRJ 2.2.5
http://docs.info.apple.com/article.html?artnum=75097)
Some interesting reads very relevant to your problem:
1.
http://www.gnutellaforums.com/showth...8221#post98221
2.
http://www.gnutellaforums.com/showth...threadid=25090
I would suggest it is mostly a Java issue & the other part a memory issue. The earlier versions of Java are not memory efficient or generally efficient, & Mac is slow to update Java versions. If you want updated Java then you need to upgrade your operating system to a higher version.