In JRubyArt we can send command line arguments to our sketches, to use them we need to call ARGV (NB: they are passed as an array of String).


def setup
  sketch_title 'ARGV in JRubyArt'
  myFont = createFont("Georgia", 36)
  textFont(myFont)
  textAlign(CENTER, CENTER)
  text(ARGV.join(' '), width / 2, height / 2)
end

def settings
  size 300, 200, FX2D
  # smooth # here
end

To run the sketch append the space separated arguments after the sketch name.


k9 --run argv.rb hello world!