Looping through java hashmap from ruby through rjb

Greetings.

I am trying to list all keys in a java.util.HashMap field.

The Java code to do this looks like:

Greetings.

I am trying to list all keys in a java.util.HashMap field.

Instead of getting the field names, I get
#<#<Class:0x2d47d74>:0x2c15208>
#<#<Class:0x2d47d74>:0x2c151a4>
#<#<Class:0x2d47d74>:0x2c150b4>

(there are three keys in the hash)

Well p (or puts etc) end up calling to_s on objects, and you're
obviously getting Object's default to_s. Does rjb have some method to
convert java strings into ruby strings ?

Fred