How can i call a java class in ruby?
If you use JRuby, you can
require 'java'
and then instantiate a Java class using eg
object = Java::package.package.ClassName.new
and then call methods using
object.method(parameter)
for more information, see Scripting Java libraries with JRuby
try this Java/Ruby Bridge:
Link
The Bridge itselfs enables you to load java classes into your ruby Code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With