Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > [ANN] java-inline 0.0.1 released

Reply
Thread Tools

[ANN] java-inline 0.0.1 released

 
 
Charles Oliver Nutter
Guest
Posts: n/a
 
      11-19-2009
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Win XP wireless network adapter gets released and then connects ba =?Utf-8?B?cGkyMmJ5Nw==?= Wireless Networking 1 08-01-2008 08:33 PM
Battlefield 2 New Patch Released (yet Again...) Silverstrand Front Page News 4 07-20-2005 04:33 PM
*Mozilla Firefox 1.0.4 Released* Roland Firefox 4 05-13-2005 03:05 PM
Firefox 1.0.1 released Z Firefox 2 02-26-2005 04:11 AM
ANN: Anyplace Control 2.6 released Yura Goncharuk Wireless Networking 0 09-28-2004 10:13 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57