Have you set the Java command line parameters that allocate meory for the Java virtual machine? Sometimes you need high values so that applications can run at a reasonable speed - especially if the applications are memory hungry (or possibly badly written!).
The version of Java you have quoted has been superseded, so you may want to upgrade to jdk-1_5_0_14 - available from the Sun website:
http://java.sun.com/javase/downloads/index_jdk5.jsp
I hope this helps in some way.
Rob