# JRuby and JNI

**URL:** <https://www.ruby-forum.com/t/jruby-and-jni/234062>\
**Category:** JRuby\
**Created:** [February 3, 2015, 1:03pm UTC](https://www.ruby-forum.com/t/jruby-and-jni/234062 "2015-02-03T13:03:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [February 3, 2015, 1:03pm UTC](https://www.ruby-forum.com/t/jruby-and-jni/234062/1 "2015-02-03T13:03:42Z")

</div>

I have a C++ shared library and want to call containing methods from  
JRuby.  
I’m aware of Ruby-FFI but don’t want to use it. Rather, I want to use  
the JNI. I’m looking for a tutorial how to use JNI within JRuby but  
haven’t found a good one so far.  
So it looks like that this is not a common scenarion. Am I right? Are  
there any drawbacks when using JNI with JRuby?
