- can JRuby work with Java Annotations?
No. Ruby doesn't have annotations. The ruby2java compiler will allow you to add annotations that are used when compiling to a class file, though.
- is it possible to use reflection from JRuby on Java class?
Yes:
java.util.Vector.methods.include? '[]' # => true
- is it possible to use reflection from Java on JRuby class?
When embedding JRuby using BSF or JSR223? Only to the extent that those technologies allow it. When using ruby2java? Yes. It generates normal Java .class files.
- do I have executable classes in JRuby?
I'm not exactly sure what you're asking.
- is it possible to redefine Java class inside of JRuby script? (the same way as I can redefine eg. Integer in C Ruby)
Yes, you can monkey patch in JRuby, but the changes aren't visible from the Java side, just JRuby:
import java.util.Vector
class Vector
def foo
"foo!"
end
end
v = java.util.Vector.new
v.foo # => "foo!"
- are there any other limitations, that prevent using JRuby as part of any Java application?
Plenty of little gotchas abound when using Java from JRuby. ruby2java is still in its infancy, and I'm not sure it's ready for a production environment yet. Other than that, the focus has been more on scripting with BSF and JSR223, which may or may not suit your purposes.