Difference between jruby AOT classes with --java flag and without

Posted by Johnathan Leppert on Stack Overflow See other posts from Stack Overflow or by Johnathan Leppert
Published on 2012-09-14T21:35:42Z Indexed on 2012/09/14 21:37 UTC
Read the original article Hit count: 346

Filed under:
|
|
|

When I compile a ruby file to a java class using jrubyc, I get different output when compiling with just jrubyc and with jrubyc --java (to generate the java file) and just javac. Why?

Example:

First Method:

$ jrubyc --java myscript.rb $ javac -cp .:./jruby-complete.jar myscript.java

Second Method:

$ jrubyc myscript.rb

I'd expect the generated classes to be exactly the same, but they're not. What's jrubyc doing under the covers?

Thanks!

© Stack Overflow or respective owner

Related posts about java

Related posts about jruby