I have the following problem. Say I have two Java classes, Foo and Bar,
where Bar depends on Foo (it contains private static Foo foo = new
Foo();). Each of these classes (they are from the same package “p” but
that’s not important) is in a different jar (foo.jar and bar.jar). Now
I’d like to require both jars from JRuby code and then use the Bar
class, only it doesn’t seem to work. This is what happens in jirb:
irb(main):001:0> require “foo.jar”
So far, so good.
irb(main):003:0> require “bar.jar”
NameError: cannot link Java class p.Bar, probable missing dependency:
How do I get Bar class aware of the Foo class? I can’t start jruby with
-classpath parameter, I need to be able to require jars dynamically from
JRuby code. Is that possible?
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
To unsubscribe from this list, please visit: