Sha256: 6d78a0b77b24e692fe5e280de7cc2ad774298eb279f421d477fda59b366e100e

Contents?: true

Size: 586 Bytes

Versions: 11

Compression:

Stored size: 586 Bytes

Contents

# frozen_string_literal: false
# class to parse java_args.txt or java_args in config.yml
class JavaOpts
  attr_reader :opts

  def initialize(sketch_root)
    arg_file = File.join(sketch_root, 'data/java_args.txt')
    @opts = []
    @opts += File.read(arg_file).split(/\s+/) if FileTest.exist?(arg_file)
    if opts.empty? && Processing::RP_CONFIG.fetch('java_args', false)
      @opts += Processing::RP_CONFIG['java_args'].split(/\s+/)
    end
  end
end

# wrap args to pass through to jvm from jruby
class JRubyOpts < JavaOpts
  def opts
    super.map { |arg| "-J#{arg}" }
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
jruby_art-1.2.9 lib/jruby_art/java_opts.rb
jruby_art-1.2.8 lib/jruby_art/java_opts.rb
jruby_art-1.2.7 lib/jruby_art/java_opts.rb
jruby_art-1.2.6 lib/jruby_art/java_opts.rb
jruby_art-1.2.5 lib/jruby_art/java_opts.rb
jruby_art-1.2.4 lib/jruby_art/java_opts.rb
jruby_art-1.2.3 lib/jruby_art/java_opts.rb
jruby_art-1.2.2 lib/jruby_art/java_opts.rb
jruby_art-1.2.1 lib/jruby_art/java_opts.rb
jruby_art-1.2.0.pre lib/jruby_art/java_opts.rb
jruby_art-1.1.3 lib/jruby_art/java_opts.rb