I'm trying to split a java string in a Rhino javascript program
var s = new java.lang.String("1 2 3");
s.split();
which give me the error
js: Can't find method java.lang.String.split().
The Rhino docs mentioned that all the javascript String.prototype methods (like match, split, etc.) are available on java string if they're not already provided by java.lang.String. Any ideas on what's going on here?