-
-
Save elvuel/5449767 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
~/projects/jruby ➔ cat my_java_thing.rb | |
require 'java' | |
java_package 'foo.bar' | |
class SomeJavaThing | |
java_signature 'void main(String[] args)' | |
def self.main(args) | |
puts args.to_a | |
end | |
end | |
~/projects/jruby ➔ jrubyc --javac my_java_thing.rb | |
Generating Java class SomeJavaThing to /Users/headius/projects/jruby/foo/bar/SomeJavaThing.java | |
javac -d /Users/headius/projects/jruby -cp /Users/headius/projects/jruby/lib/jruby.jar:. /Users/headius/projects/jruby/foo/bar/SomeJavaThing.java | |
~/projects/jruby ➔ java -cp .:lib/jruby.jar foo.bar.SomeJavaThing hello world | |
hello | |
world |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment