How do I use Rhino return a string from Java to Javascript, all I get is org.mozilla.javascript.JavaNativeObject
when I use
var jsString = new java.lang.String("test");
inside my js file.
Is this the right way to do it?
var jsString = String(new java.lang.String("test"));
The goal is to have a Java method to return the String object instead of creating it on the fly like above.
var jsString = "test";
? – Dorsy