From: steve.drach@... (Steve Drach) Date: 2004-06-19T09:23:21+09:00 Subject: JRuby: How does one keep Java objects as Java objects so they can be used in method calls? I'm trying to use JDOM and JRuby (yes I know about RexML). In the following program, I get an error when I pass f to sb.build because f is a RubyFile and not a Java File object. The error I get is: no method 'build' with argument types matching [org.jruby.RubyFile] (NameError) What is the correct way to deal with this, I believe, common issue? Thanks, Steve ------ require 'java' class Foo include_package 'java.io' include_package 'org.jdom' include_package 'org.jdom.input' attr_reader :d def initialize sb = SAXBuilder.new f = File.new "/home/drach/schema/modeler/build.xml" @d = sb.build f end end foo=Foo.new