Marshalling Java Objects

Hi,
I have some trouble in Marshalling Java Objects in JRuby. Here are my
two
scenarios,

  1. require ‘java’
    java_import java.lang.Long
    class A
    def initialize
    @process = Long.new “15”
    end
    end
    Now if i instantiate this class and give Marshal.dump a, i get,
    no marshal_dump is defined for class Java::JavaObject

  2. Now, if i give,
    require ‘java’
    java_import java.lang.Runtime
    class A
    def initialize
    @process = Runtime.getRuntime().exec(“ls”)
    end
    end
    For this, i get,
    can’t dump anonymous class #Class:01x19c6163

I am using jruby1.1.4… Is this something not possible with Jruby or
something that is fixed in later versions?

Thanks in advance,
Gajendran