[ANN] java-inline 0.0.1 released

Discussion in 'Ruby' started by Charles Oliver Nutter, Nov 19, 2009.

  1. 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
     
    Charles Oliver Nutter, Nov 19, 2009
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Abhi
    Replies:
    2
    Views:
    766
    E. Robert Tisdale
    Jul 3, 2003
  2. Alvin
    Replies:
    7
    Views:
    511
    E. Robert Tisdale
    May 6, 2005
  3. Replies:
    3
    Views:
    494
  4. Daniel Vallstrom
    Replies:
    2
    Views:
    2,057
    Kevin Bracey
    Nov 21, 2003
  5. Nish
    Replies:
    4
    Views:
    545
    Thomas Stegen
    Oct 8, 2004
Loading...

Share This Page