Hi, I think the problem is that you initialize a new Vector object in Java named v and another Vector in Beanshell which is also named v. Finally you end up having two different objects having just the same name. If you want to fill the "Java" v your code should look like this:
test_code = "v = bsf.lookupBean(\"v\"); v.addElement(\"001\"); print(v.size());" Now the v object outside of BSF should have one element. Greetings, -Rainer Hahnekamp Am Montag, den 28.02.2005, 18:25 +0100 schrieb mario nee: > Hello, when i try this code > > > v = new Vector(); > bsfManager.declareBean("v", v, v.getClass()); > test_code = "v = new Vector(); v.addElement(\"001\"); print(v.size());"; > bsfManager.exec("beanshell", "(java)",1,1,test_code); > bsfManager.lookupBean("v") > > v is an empty Vector instead of a vector with 1 element. > Why ? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]