Sometimes, when you add Java Beans/PJCs to your Oracle Forms application, you get Java memory error message, because your Java Bean needs big memory size, or just don't make some clean up.
If you want to give more memory to the JVM, modify your /forms/server/xxbasexxx.htm file like the following:
Example of modified basejpi.htm:
<PARAM NAME="java_arguments" value="-Xms32m -Xmx128m">
<EMBED SRC="" PLUGINSPAGE="%jpi_download_page%"
The -Xmx argument defines the max memory size that the heap can reach for the JVM. You must know your program well and see how it performs under load and set this parameter accordingly. A low value can cause OutOfMemoryExceptions or a very poor performance if your program's heap memory is reaching the maximum heap size.
The -Xms argument sets the initial heap memory size for the JVM. This means that when you start your program the JVM will allocate this amount of memory instantly. This is useful if your program will consume a large amount of heap memory right from the start. This avoids the JVM to be constantly increasing the heap and can gain some performance there.
So tune these 2 parameters to fit your needs.