Jrubyc option for java 1.5

Anyone please help me on how to pass option to tell jrubyc to compile
ruby code to .class which compatible with java 1.5 ?

Thank in advance

Hello, Pinit.

Anyone please help me on how to pass option to tell jrubyc to compile
ruby code to .class which compatible with java 1.5 ?

jrubyc --javac some_ruby_file.rb

This will work best if you’ve added java_signature calls above the
Ruby methods you plan on invoking from Java.

–Ian

Thank you Ian,

 Do I or How I pass option for javac ? Do I need to pass --target 

1.5 to make it work I want ?

Pinit A.

Ian D. wrote in post #955847:

Hello, Pinit.

Anyone please help me on how to pass option to tell jrubyc to compile
ruby code to .class which compatible with java 1.5 ?

jrubyc --javac some_ruby_file.rb

This will work best if you’ve added java_signature calls above the
Ruby methods you plan on invoking from Java.

–Ian

Hello, Pinit.

Do I or How I pass option for javac ? Do I need to pass --target
1.5 to make it work I want ?

You can use the “-J” option to pass options to the underlying javac
instance, like so:

jrubyc --javac -Jtarget -J1.5 some_ruby_file.rb

–Ian

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs