注意:尽量不使用Domino中的Java
该功能在R5里面不能实现
Uselsx "*javacon" try: 'set up error handler On Error GoTo catch Dim jclass As JavaClass Dim localHost As JavaObject 'Establish JVM connection (JavaSession) Dim jsession As New JavaSession 'Find desired Class (JavaClass) Set jclass = jsession.GetClass("java/net/InetAddress") 'Get desired object (JavaObject) Set localHost = jclass.getLocalHost() 'Access object's methods and properties MsgBox "Name: " & localHost.getHostName() MsgBox "Address: " & localHost.getHostAddress() GoTo finally catch: 'log error 'Msgbox Erl & ":" & Error MsgBox LSI_Info(2) & " called by " & LSI_Info(12) & "(" & LSI_Info(430) & "): " & Error$ & " - Line: " & CStr(Erl) Dim jError As JavaError Set jError = jsession.GetLastJavaError() MessageBox "Java Error: " & jError.ErrorMsg() MessageBox " Stack trace: " & jError.Stacktrace() jsession.Clearjavaerror 'resume to the final thing Resume finally 'do the final thingc finally: LS和Java对象的映射关系见链接