I have some properties in an object that I would like to add to the global namespace. In javascript on the browser I could just add it to the window object like so:
window
I've not used rhino but couldn't you just use var?
i.e.
var foo = myObject.foo; foo();
Edit: Damn knew there'd be a catch! Miles' suggestion would be the go in that case.