Jruby support

Add jruby compatibility