Tuesday, February 24, 2009

Domo Arigato, Mr. Ruboto

# cat test.rb
require 'java'
import java.lang.System

class Ruboto
def greet(who)
puts "Hello, #{who}!"
end
end

name = System.get_property('java.runtime.name')
Ruboto.new.greet(name)

# dalvikvm -classpath ruboto.jar org.jruby.Main -X-C test.rb
Hello, Android Runtime!




Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 2.5 Attribution License.

14 comments:

  1. so Jruby comes to android platform thats wonderful :)

    ReplyDelete
  2. newbie question:
    does this mean that jruby can be used to develop applications on the android plattform?

    ReplyDelete
  3. I guess last night's RUM inspired you.

    ReplyDelete
  4. so ... where is Project Ruboto hosted so that we all may participate in the fun?

    ReplyDelete
  5. mmm, I can't wait to play! Code?

    ReplyDelete
  6. That's pretty cool. Now I want to get an Android phone.

    ReplyDelete
  7. Wow. Now that the fastest turn around I have ever seen. Very cool Charlie. Sweet!

    ReplyDelete
  8. Hey, if you need any particular help with Android support in JRuby, drop me a line. I was planning on doing Android/JRuby experiments in a couple of months, but if you're starting sooner, that's cool too!

    ReplyDelete
  9. looks like MRI [can] run on android.
    http://otype.net/2009/01/static-ruby-miniruby-187-on-android-dev-phone-1/

    ?
    -=r

    ReplyDelete
  10. I thought that JRuby does quite a bit of dynamic Java byte code generation, and that Dalvik doesn't support dynamic byte code generation. Am I wrong on one of those two points? Would you mind giving a brief description of how you've gotten a dynamic language working on Dalvik? Thanks, and exciting work!

    ReplyDelete