From: Charles Oliver Nutter Date: 2008-04-03T19:07:06+09:00 Subject: Re: Passing command line arguments to Ruby or JRuby script. Swati Sharma wrote: > Now, the problem is that i have made 3 classes and each of these classes > have to create 8 threads each (in java). so what i need is that i pass > on the IP Address and and an integer to the ruby script so that each > category (8 threads) can use the same ruby file instead of duplicating > the ruby scripts for individual threads. Your best bet would be one of the following: - set a couple variables somewhere for each script run that they can use to retrieve the IP and integer - set up the ARGV array so it has the command-line parameters you want to pass through There are also other ways to pass data into a scripting engine through JSR223 that I won't list here, but google for them and you'll find some good examples. - Charlie