jrubyc: cannot find symbol lockAndRequire #808

phs opened this Issue Jun 17, 2013 · 3 comments


None yet

2 participants

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
$ jrubyc --java --javac my_impl.rb
/Users/phil/code/mozweb/MyImpl.java:16: error: cannot find symbol
  symbol:   method lockAndRequire(String)
  location: class LoadService
1 error

This works on my machine with Java 7.

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

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