Skip to content

Instantly share code, notes, and snippets.

@shellac
Created August 28, 2009 16:07
Show Gist options
  • Save shellac/177070 to your computer and use it in GitHub Desktop.
Save shellac/177070 to your computer and use it in GitHub Desktop.
pldms@snowball:/tmp/ant-jruby$ jruby -S gem install bitescript
pldms@snowball:/tmp/ant-jruby$ cat file.rb
require "java"
require "lib/ant.jar"
include_class "org.apache.tools.ant.Task"
class SampleTask < Task
def execute
puts "Hello from SampleTask!"
end
end
pldms@snowball:/tmp/ant-jruby$ jruby -rubygems PATH_TO_JRUBY/tool/compiler2.rb SampleTask SampleTask file.rb
pldms@snowball:/tmp/ant-jruby$ javap SampleTask
Compiled from "file.rb"
public class SampleTask extends org.jruby.RubyObject{
static {};
public SampleTask();
public org.jruby.runtime.builtin.IRubyObject execute();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment