Lotus Notes
采用本地访问方式:
(1)步骤一:本机服务器安装 Lotus Notes 客户端 32位
(2)步骤二:准备 开发环境:jdk1.7 32 (因為Lotus Notes 客戶端是32位, JDK 64 位加载报错)
(3)核心代码:
package com.maxnerva.cloud.lotusnotes.util;
import lombok.extern.slf4j.Slf4j;
import lotus.domino.NotesException;
import lotus.domino.NotesFactory;
import lotus.domino.NotesThread;
import lotus.domino.Database;
import lotus.domino.Session;
@Slf4j
@Component
public class TransferToNotesUtil {
private static String password = "password";
private static String ip = "IP";
private static String user = "test.nsf";
public static Database getDataBase() throws NotesException {
NotesThread.sinitThread();
Session session = null;
session = NotesFactory.createSession((String) null, (String) null, password);
Database database = session.getDatabase(ip, user, true);
boolean open = database.isOpen();
if (!open) {
database.open();
}
return database;
}
public static void main(String[] args) throws NotesException {
getDataBase();
}
}
pom.xml :引入 Notes.jar
注意:
1. Notes.jar 来自 Lotus Notes 客户端的安装后的安装文件中
2.配置环境变量Notes 客户端环境变量:
C:\Program Files (x86)\IBM\Lotus\Notes\nlsxbe.dll
个人理解:Java 通过 Notes .jar访问nslxbe.dll 达到访问服务端目的
参考链接
2.