Back to: All Forums  Using JRuby  java_require
09 Aug 2013, 15:23
Generic-user-small

John James (2 posts)

After the example on page 75:

with the following file: my_foo.rb


require 'java'
 java_require 'my_foo'
 class Foo
   def bar(a,b)
     puts a + b
   end
 end

using jruby 1.7.4 and java 1.7.0_25

command: jrubyc –javac my_foo.rb

i get the error:

“/Users/jhj/Development/workbench/Foo.java:16: error: cannot find symbol ruby.getLoadService().lockAndRequire(“my_foo”); ^ symbol: method lockAndRequire(String) location: class LoadService 1 error”

Any Suggestions?

09 Aug 2013, 17:43
Generic-user-small

John James (2 posts)

I also tried the same command with the supplied similar example code in waveform_with_sigs.rb and got the same result

10 Aug 2013, 05:49
Mr_sketchy_pragsmall

Ian Dees (195 posts)

Hi, John.

Sorry about this. It looks like this is a bug in jrubyc. They appear to have committed a fix for the issue, but haven’t yet released a version of JRuby containing the fix.

I just tried a freshly built JRuby cloned from the latest source, and that solved the issue for me. Hopefully, they’ll release a 1.7.5 soon.

Sincerely,

Ian

  You must be logged in to comment