I am going to have quiet a few scripts each one for a different purpose.
So, in my java file where I pass the name of the script, I wanted to drive
that parameter by using a Resource Bundle. So, I was wondering if I can
include a "package" statement at the top of my script and then have the name
of the file (along with the package) in the properties file and use it that
way. Any comments?
For example my script(MyBeanShell.bsh) would look like:
package com.mypackage;
import java.util.Collection;
import java.util.Iterator;
import java.util.*;
funtion......{
}
And the properties file would look like:
ffh_bs = com.mypackage.MyBeanShell.bsh
And the jave file using the script would:
scriptName = this.rsBundle.getString(ffh_bs);
i.source(scriptName);
Thanks
Sharma
|