Skip to content

Instantly share code, notes, and snippets.

@timfel
Created September 27, 2010 13:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timfel/599036 to your computer and use it in GitHub Desktop.
Save timfel/599036 to your computer and use it in GitHub Desktop.
bin/jruby jruby-cext/examples/MyTest/MyTest.rb
require 'mytest'
MyTest.test1
LD_LIBRARY_CONFIG=jruby-cext/examples/MyTest:cext/build \
bin/jruby -J-Djava.library.path=cext/build \
jruby-cext/examples/MyTest/MyTest.rb
include Java
m = org.jruby.cext.ModuleLoader.new
ext = File.join(File.dirname(__FILE__), "mytest")
m.load(self, ext)
MyTest.test1 # call the C defined method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment