jrubyc: cannot find symbol lockAndRequire #808

Closed
phs opened this Issue Jun 17, 2013 · 3 comments

Projects

None yet

2 participants

@phs
Contributor
phs commented Jun 17, 2013
$ jruby --version
jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) 64-Bit Server VM 1.7.0_12-ea-b08 +indy [darwin-x86_64]
$ cat my_impl.rb
require 'java'
java_require 'my_impl'

class MyImpl
end
$ jrubyc --java --javac my_impl.rb
/Users/phil/code/mozweb/MyImpl.java:16: error: cannot find symbol
        __ruby__.getLoadService().lockAndRequire("my_impl");
                                 ^
  symbol:   method lockAndRequire(String)
  location: class LoadService
1 error
@BanzaiMan
Member

This works on my machine with Java 7.

@phs
Contributor
phs commented Jun 17, 2013

@BanzaiMan What version of jruby are you using? I've got github's master and indeed there is no lockAndRequire in the codebase.

@BanzaiMan BanzaiMan closed this in ef9a3ff Jun 17, 2013
@BanzaiMan
Member

Ah. My bad. I see what you're doing now. You are calling it with javac. I apologize for the confusion.

LoadService.lockAndRequire() was replaced with LoadService.require() a long time ago, and jrubyc was not updated to reflect it. The above commit fixes it. (If you need it now for 1.7.4, you can do the same.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment