OS X's memory management is automatic--no need to do anything here.
Re the "self-fixing" I've noticed that too, and am not sure how it works. It might be "just-in-time" (JIT) caching of high-demand parts of Java.
What else to do? Hmm--a "safe boot" wouldn't hurt. Just shutdown the machine for two minutes, then hold the shift key right after the start-up sound (until the spinning grey cog appears). This will do a file system check-and-repair and boot into "safe mode." It's a bit like the OS 9 repair with extensions off.
LW has know about the problem with Apple's java for about a year, and keeps hoping the next java release will fix it. Sadlly, the last few releases have also added some unpleasant surprises. Still, I keep hoping