JRuby and Java Reflection

Hello, I’m new to JRuby so don’t roast me, plzz.

I’m using a Java lib that have a method that gets Class parameter.

In Java I can do something like:


I want to the same with JRuby. First, i created a Ruby class MyRubyClass, but should i do now?

I’ve tried to add become_java! to the class and then:


but I get the error no method 'method' for arguments (org.jruby.RubyClass).

:thinking: So what can I do?

Thanks in advance.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs