Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Call JRuby from Java Example

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 JavaCallerApp.java
Octocat-spinner-32 JavaInterfaceExample.java
Octocat-spinner-32 JrubyAdderImpl.java
Octocat-spinner-32 JrubyAdderImpl.rb
Octocat-spinner-32 README
README
Calling JRuby From Java

Here's a toy example of how to implement a Java interface method in JRuby and then call it from Java.

Compile it:
javac JavaInterfaceExample.java
jrubyc --javac -cp . JrubyAdderImpl.rb
javac -cp /usr/local/jruby/lib/jruby.jar:. JavaCallerApp.java

Run the Java caller app:
java -cp /usr/local/jruby/lib/jruby.jar:. JavaCallerApp

--
@tommychheng
http://tommy.chheng.com
Interested in computer science grad school? Find top computer science grad schools based on their research using http://gradschoolnow.com
Something went wrong with that request. Please try again.