Class: JLauncher::JvmLaunchConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/jlauncher.rb

Overview

All the info that is needed to launch

Instance Method Summary collapse

Constructor Details

#initialize(classpath_elements, main_class) ⇒ JvmLaunchConfig

Returns a new instance of JvmLaunchConfig.



130
131
132
133
134
# File 'lib/jlauncher.rb', line 130

def initialize(classpath_elements, main_class)

  @main_class = main_class
  @classpath_elements = classpath_elements
end

Instance Method Details

#run(args) ⇒ Object



136
137
138
139
# File 'lib/jlauncher.rb', line 136

def run(args)
  classpath = @classpath_elements.join(File::PATH_SEPARATOR)
  exec("java", "-cp", "#{classpath}", "#{@main_class}", *args)
end