Friday, December 30, 2011

How to clear a Java Error Using Java code in Notes

ClearJavaError: It is one of the java object for clearing all

error while trying to get a specific java class. The user want

to get all the error informations then all java errors are

cleared with help of this object.

Code:

Dim jclass As JavaClass
Dim jrror As JavaError
On Error GoTo Catch
Set mySession = new JavaSession()
Set jclass = mySession.GetClass(”Invalid”)
exit Sub
Catch:
Set jerror = mySession.getLastJavaError()
MessageBox jerror.errormsg,, “Error”
mySession.ClearJavaError

Dim jclass As JavaClass

Dim jrror As JavaError

On Error GoTo Catch

Set mySession = new JavaSession()

Set jclass = mySession.GetClass(”javaClass”)

exit Sub

Catch:

Set jerror = mySession.getLastJavaError()

MessageBox jerror.errormsg,, “Error”

mySession.ClearJavaError

No comments:

Post a Comment