require_relative '../feature/java/merge_jar' require_relative '../feature/java/merge_worker' module IronWorkerNG module Code class Java < IronWorkerNG::Code::Base include IronWorkerNG::Feature::Java::MergeJar::InstanceMethods include IronWorkerNG::Feature::Java::MergeWorker::InstanceMethods def create_runner(zip, init_code) IronWorkerNG::Logger.info 'Creating java runner' unless @worker IronWorkerNG::Logger.error 'No worker specified' raise 'No worker specified' end classpath_array = [] @features.each do |f| if f.respond_to?(:code_for_classpath) classpath_array << f.send(:code_for_classpath) end end classpath = classpath_array.join(':') IronWorkerNG::Logger.info "Collected '#{classpath}' classpath" zip.get_output_stream('runner.rb') do |runner| runner.write < 'java', :klass => IronWorkerNG::Code::Java)