Lotus Notes Java app can’t find notes.ini

后端 未结 3 1699
礼貌的吻别
礼貌的吻别 2021-01-22 03:57

Both the systems described are Windows XP with Lotus Notes 8.5.

I have a Java app (sample code below) that uses notes.jar to interact with Lotus Notes. The app works fin

3条回答
  •  鱼传尺愫
    2021-01-22 04:49

    Add a new command-line parameter, "=c:\data\johnsmith\NotesData\notes.ini" . To make this happen, you need to use NotesFactory.CreateSession(String host, String args[], String user, String passwd); method, after setting up a new String array containing that parameter and whatever other arguments were passed, since itis basically supposed to be the String args[] as passed to static Main. (The =fullpath\notes.ini parameter just needs to be in the array, it doesn't need to be in any specific location.)

    This permits the session to be initialized with the absolute path to the notes.ini file used, and appears to be supported since (though I could be wrong) Notes 5.0.5.

    Notably, the Directory= line is going to be taken from that notes.ini and used for all error reporting and logging, as the user's private data directory.

提交回复
热议问题