Is there a way to call a java class that I have written that returns a value (a string) from within SilkTest?

I have tried using InvokeJava but that requires that I have a reference to a 4Test object.

object.InvokeJava(sUserJavaClass, laArgs)

But what I'm trying to do is have a java class that does some stuff, then return some value to silktest. Is this possible in SilkTest?