why so many different ways to include Java classes into JRuby? What are the differences? Which one should I use?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can find quite a few examples about working with Java classes at:
https://github.com/jruby/jruby/wiki/CallingJavaFromJRuby
It states, that you should use
java_importinstead ofimportdue to the JRUBY-3171 bug.Also
include_classis or will be deprecated (JRUBY-3797) in favor ofjava_import.Currently
java_importis the recommended way to import a Java class.