javajrubywarbler

How to set source and target java release in Warlber


I'm wonder if there is a way in the warble.rb config to set what source and target versions of java to build with? It seems like it just uses what ever jdk is active at the time. I can do this with java and jruby via the following commands but I can't figure it out for Warbler.

jrubyc -J -source=1.6 -J -target=1.6 --java

javac -source=1.6 -target=1.6


Solution

  • Checkout bytecode_version option [1]:

    # When set it specify the bytecode version for compiled class files
    # config.bytecode_version = "1.6"
    

    [1] https://github.com/jruby/warbler/blob/master/warble.rb