我尝试在 java 中使用 Lotus Notes API,但我收到对象错误。 这是代码:
import lotus.domino.*;
public class HelloTest extends NotesThread {
public static void main(String argv[]){
HelloTest t = new HelloTest();
t.start();
}
public void runNotes() {
try{
Session s = NotesFactory.createSession();
// To bypass Readers fields restrictions
Session s = NotesFactory.createSessionWithFullAccess();
String p = s.getPlatform();
System.out.println("Platform = " + p);
}
catch (Exception e){
e.printStackTrace();
}
}
}
谁能帮帮我?
最佳答案
- 您必须将路径添加到笔记的安装文件夹,例如
C:\Program Files (x86)\IBM\Notes
和笔记的用户数据文件夹,例如C:\Lotus\Notes\Data
到您的环境变量PATH
- 使用 x32-JRE(为了与 Notes DLL 兼容)
- 在
Session s = NotesFactory.createSession();
之前调用
lotus.notes.NotesThread.sinitThread();
关于java.lang.UnsatisfiedLinkError : lsxbe (Not found in java. 库路径),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31583756/