Forum OpenACS Q&A: Response to ns_java / ns_javablend

Collapse
Posted by Dan Wickstrom on
It would be quite easy.  Just modify NsJava_JavaEvalCmd to use CallStaticMethod instead of CallStaticVoidMethod, and then use Tcl_SetResult to return the return string from the called method.  There would also be a slight amount of work in converting from the java utf string format, and the method signature stuff would need a small change to reflect the fact that the method is expected to return a string instead of void.  All in all not much work other than looking up a few things about the java JNI interface and a basic understanding of how to return values back to the tcl interpreter.