moop,
I'd suggest rewriting that in English. If you struggle with the
language, be verbose (say a lot). We're more likely to glean (obtain)
meaning that way.
Beanshell can be embedded, that is, used in your Java program.
However, I don't think it can see the local variables that are declared
in your Java program, but that's not a real limitation.
We'll give a more specific answer to a more understandable question.
Hopefully.