[ANN] java-inline 0.0.1 released

  • Thread starter Charles Oliver Nutter
  • Start date
C

Charles Oliver Nutter

I've finally released 0.0.1 of my little java-inline plugin for
RubyInline, which allows you to embed Java code directly into a Ruby
class. It's still pretty barebones, but it would be easy to improve it
(the entire library is a bit over 100 lines of Ruby code).

I've also moved the repo to http://github.com/jruby/java-inline.

Here's a sample session, and there's a fib/factorial example in the
examples dir:

~/projects =E2=9E=94 gem install java-inline
Successfully installed ZenTest-4.1.4
Successfully installed RubyInline-3.8.3
Successfully installed java-inline-0.0.1-java
3 gems installed
Installing ri documentation for ZenTest-4.1.4...
Installing ri documentation for RubyInline-3.8.3...
Installing ri documentation for java-inline-0.0.1-java...
Installing RDoc documentation for ZenTest-4.1.4...
Installing RDoc documentation for RubyInline-3.8.3...
Installing RDoc documentation for java-inline-0.0.1-java...

~/projects =E2=9E=94 cat demo.rb
require 'rubygems'
require 'java_inline'

class Woo
inline :Java do |builder|
builder.java '
public static String hello() {
return "woo";
}
'
end
end

puts Woo.new.hello

~/projects =E2=9E=94 jruby demo.rb
woo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top