Created
August 28, 2009 16:07
-
-
Save shellac/177070 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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