atom feed3 messages in org.codehaus.jruby.userRe: [jruby-user] dl/import on JRuby
FromSent OnAttachments
Leonardo BorgesApr 2, 2008 6:19 pm 
Antti KarantaApr 2, 2008 10:54 pm 
Leonardo BorgesApr 3, 2008 7:09 am 
Subject:Re: [jruby-user] dl/import on JRuby
From:Antti Karanta (
Date:Apr 2, 2008 10:54:38 pm

On Thu, 03 Apr 2008 04:19:20 +0300, Leonardo Borges <> wrote:

And indeed if I open jirb and type require 'dl/import', jRuby doesn't find it.

Would you have any suggestion about it? I googled it a lot but didn't find anything so far....

I would guess dl/import could be implemented into jruby using JNA (, but it seems no-ones done it, at least yet.

As a workaround, I would suggest using a conditional w/ something like if RUBY_PLATFORM == 'java' and then using JNA to access your native stuff if running on jruby. I recall that JNA home page even had some JRuby examples.

One option to using JNA is using swig ( to wrap your native funcs w/ Java wrappers and then calling them from jruby. This requires a separate c/c++ compilation phase for the JNI code (JNA does not require this compilation step).


--------------------------------------------------------------------- To unsubscribe from this list, please visit: