When a UNIX program "core dumps", it means the program received a fatal signal and died. The actual "core dump" is a file that contains the program state at the time of death, and it can be used for debugging.
Anyway, if your JVM is core dumping, it's got a bug. Although the Java code you write may expose it, it's not a bug in your Java code. Make sure you've upgraded to the newest JVM available for your platform. If you're using GCJ, download and use a Sun JVM from java.sun.com instead. If you're already using a Sun JVM, you could have a look in the Bug Parade (http://bugs.sun.com/bugdatabase/index.jsp) and see if this is a known problem and if a fix is coming.