'JRUBY'에 해당되는 글 1건

  1. 2014.05.23 jruby emb

jruby emb

JRUBY 2014. 5. 23. 08:01

import org.jruby.Ruby;

import org.jruby.RubyRuntimeAdapter;

import org.jruby.javasupport.JavaEmbedUtils;  

{...}

// Create runtime instance

Ruby runtime = JavaEmbedUtils.initialize(new ArrayList());

RubyRuntimeAdapter evaler = JavaEmbedUtils.newRuntimeAdapter();


{...}

evaler.eval(runtime, "puts 1+2");

{...}


// Shutdown and terminate instance

JavaEmbedUtils.terminate(runtime);


https://github.com/jruby/jruby/wiki/DirectJRubyEmbedding



Posted by sjokim
,