Connecting Java Virtual Machine

Hello all,

I have successfully connected to the Java Virtual Machine (Java 1.4) within Ruby using a small piece of C code. The technique is very similar to how Rjni connects to the Java Virtual Machine. The problem is when my Ruby script exits it hangs resulting from the JVM connection and I have to abort the Ruby interpreter. Any suggestions on what could be causing this and how to eliminate it? I am running Red Hat 7.2 with Ruby 1.8.

Thanks in advance,
Michael