?? java連接lotus的代碼.txt
字號:
//需要把lotus里的notes.jar,ncso.jar放入classpath
**
* <p>Title: 圖形化設計</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2004</p>
* <p>Company: </p>
* @author zhongweihai newwei2001@yahoo.com.cn
* @version 1.0
*/
import lotus.domino.*;
public class ConnDomino {
public Session getSession(String sip,String username,String password)
{
lotus.domino.Session s;
String sior;
try {
sior =NotesFactory.getIOR(sip+":63148");
s = NotesFactory.createSessionWithIOR(sior,username,password);
}
catch (Exception ex) {
s = null;
}
return s;
}
public static void main(String[] args)
{
String host="10.81.3.11";
String user="admin";
String pwd="domino";
Session s;
ConnDomino conn = new ConnDomino();
s = conn.getSession(host,user,pwd);
try{
System.out.println(s.getUserName());
}
catch(Exception e){}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -