class Processing::Launcher
The command class check for configuration and options, before creating and executing the jruby (or java) command to run the sketch
Attributes
command[R]
Public Class Methods
new(runner:, args:, filename:)
click to toggle source
# File lib/jruby_art/launcher.rb, line 10 def initialize(runner:, args:, filename:) @command = if Processing::RP_CONFIG.fetch('JRUBY', true) JRubyCommand.new(runner, filename, args) else JavaCommand.new(runner, filename, args) end end
Public Instance Methods
cmd()
click to toggle source
Trade in this Ruby instance for a JRuby instance, loading in a starter script and passing it some arguments. Unless you set JRUBY: false in ~/.jruby_art/config.yml, an installed version of jruby is used instead of our vendored one. Note the use of jruby-complete might make using other gems in your sketches hard (but not impossible).…
# File lib/jruby_art/launcher.rb, line 23 def cmd cmda = command.cmd begin exec(*cmda) # exec replaces the Ruby process with the JRuby one. rescue Java::JavaLang::ClassNotFoundException end end