Skip to content

Instantly share code, notes, and snippets.

@danlucraft
Created June 4, 2010 16:19
Show Gist options
  • Save danlucraft/425612 to your computer and use it in GitHub Desktop.
Save danlucraft/425612 to your computer and use it in GitHub Desktop.
$ echo "class Foo; end" > foo.rb
$ jrubyc foo.rb
Compiling foo.rb to class foo
$ jar cvf foo.jar foo.class
added manifest
adding: foo.class(in = 3387) (out= 1505)(deflated 55%)
$ jirb
require 'rj^Hirb(main):001:0> require 'java'
=> true
irb(main):002:0> require 'file:foo.jar!/foo'
=> true
irb(main):003:0> Foo
=> Foo
irb(main):004:0> Foo.new
=> #<Foo:0x7bd349e2>
irb(main):005:0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment