I'm using warbler to build a jar out of ruby classes so that it can be run as a interactive application. Now, I want to use that jar as a library in my java application. I've noticed that warbler generated jar contains ruby classes compiled using jrubyc without --javac option. So dows anyone know how to generate a jar using warbler so that it can be run as a standalone application as well can be used as a library in Java projects so that object of ruby classes can be created in Java?
Below is how my ruby code is structured:
core
|--- lib
|----a.rb
|----b.rb
|---java_lib
a.rb contents:
require 'b'
class A
def test
ob=b.new
puts ob.test
end
end
b.rb contents:
class B
def test
puts "test"
end
end
Then, I've created a jar of above using warbler, put a jar in classpath of another java project and tries to access a.test. But it says "unable to load -- b"