Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jrubyc: cannot find symbol lockAndRequire #808

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

Comments

Projects
None yet
2 participants
@phs
Copy link
Contributor

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

This comment has been minimized.

Copy link
Member

commented Jun 17, 2013

This works on my machine with Java 7.

@phs

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Member

commented Jun 17, 2013

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
You can’t perform that action at this time.