Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

Bean Scripting Framework Question



Hello,

Can someone who knows about Jakarta BSF project help me on this :

I am trying to run a jython script from java. Ive created a BSFManager and i can execute the script with its "exec" method. However i have modified the script to accept arguments (sys.argv[1]). How can i pass arguments from within BSFManager and how can i capture its output? I think there is a method "apply" which does this but i don't understand how to use it.

I want to pass to my script a String argument and get back a String result

Thanks