Hi!

I have a JRuby script as shown below:

  require 'java'
  include_class 'java.util.HashMap'
  $map2 = HashMap.new


and I would like to retrieve the map2 object in the following Java application:

  BSFManager manager = new BSFManager();
  manager.registerBean("map2", HashMap.class);
  ...
  HashMap map2 = (HashMap) manager.lookupBean("map2");


and the ClassCastException is thrown from the last line:

  Exception in thread "main" java.lang.ClassCastException: java.lang.Class


Do you have any idea of what could be the problem?
How can I pass the object created in JRuby and return it to Java application?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to