I suppose, you are using beanshell library. There is no way to do so, according to sources: the utility takes only 2 arguments: the URL and the local script filename. It even does not support several script filenames, as it claim to.
public class Remote
{
public static void main( String args[] ) throws Exception
{
if ( args.length < 2 ) {
System.out.println("usage: Remote URL(http|bsh) file [ file ] ... ");
System.exit(1);
}
String url = args[0];
String text = getFile(args[1]);
int ret = eval( url, text );
System.exit( ret );
}
Also the server-side should be aware about the arguments passed.
The ways out for you:
- Create the script template, in which you will substitute the arguments for the script and save the substitute script to temp dir before passing to
bsh.Remote
- Create a remote file, where the script can read arguments from. You need additional communication with remote site to upload this file before calling
bsh.Remote
.