Just pay attention to the return value
of java_last_exception_get(), it's an
exception java object.
To use it just call normal operations on a exception java object:
ex:
@$myconnect->execute(); // @ to avoid warning...
$exc=java_last_exception_get();
$res=$exc->getMessage(); // method call on a exception object...
$exres="class nToxic.Connect:login failed";
$this->assert($res == $exres, "$res == $exres");