S
Steve Drach
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
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