Sha256: e127dca721c9dd64169d3635621126642444a05cddaccc83418e299d5e44bcaa

Contents?: true

Size: 879 Bytes

Versions: 17

Compression:

Stored size: 879 Bytes

Contents

require 'iron_worker_ng/feature/java/merge_jar'

module IronWorkerNG
  module Code
    module Runtime
      module Java
        include IronWorkerNG::Feature::Common::MergeExec::InstanceMethods
        include IronWorkerNG::Feature::Java::MergeJar::InstanceMethods

        def runtime_run_code(local = false)
          classpath_array = []

          classpath_array << @exec.path

          @features.each do |f|
            if f.respond_to?(:code_for_classpath)
              classpath_array << f.send(:code_for_classpath)
            end
          end

          classpath = classpath_array.join(':')

          IronCore::Logger.info 'IronWorkerNG', "Collected '#{classpath}' classpath"

          <<RUN_CODE
java -cp #{classpath} #{@exec.arg(:class, 0).nil? ? "-jar #{File.basename(@exec.path)}" : @exec.arg(:class, 0)} "$@"
RUN_CODE
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
iron_worker_ng-1.3.0 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-1.2.0 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-1.1.0 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-1.0.4 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-1.0.3 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-1.0.2 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-1.0.1 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-1.0.0 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-0.16.4 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-0.16.3 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-0.16.2 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-0.16.1 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-0.16.0 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-0.15.3 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-0.15.2 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-0.15.1 lib/iron_worker_ng/code/runtime/java.rb
iron_worker_ng-0.15.0 lib/iron_worker_ng/code/runtime/java.rb