just started learning jRuby and tried to create a jar and use it but
getting following error when I java_import ‘packagename’
NameError: cannot load Java class com.foo.bar.
Could anyone point me in right direction.
def bar(a, b)
puts a + b
from foo folder I run
irb(main):001:0> require ‘foo.jar’
irb(main):003:0> java_import ‘com.foo.bar’
NameError: cannot load Java class com.foo.bar
for_name' from org/jruby/javasupport/JavaUtilities.java:34:inget_proxy_class’
java_import' from org/jruby/RubyArray.java:2409:inmap’
java_import' from (irb):3:inevaluate’
eval' from org/jruby/RubyKernel.java:1521:inloop’
catch' from org/jruby/RubyKernel.java:1284:incatch’
Thank you for your time.