Class: JLauncher::JvmLaunchConfig
- Inherits:
-
Object
- Object
- JLauncher::JvmLaunchConfig
- Defined in:
- lib/jlauncher.rb
Overview
All the info that is needed to launch
Instance Method Summary collapse
-
#initialize(classpath_elements, main_class) ⇒ JvmLaunchConfig
constructor
A new instance of JvmLaunchConfig.
- #run(args) ⇒ Object
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 |