I'm building some app using Java API for IBM Notes/Domino that use local IBM Notes client and Notes.jar that works under Linux (Ubuntu in my case). Usual notes.ini file can be found at /home/user/ibm/notes/data/notes.ini, but I want to use different configuration. How can I set in my my app/Notes client which notes.ini should it use?
-
Should not be closed. The question is about Notes programming, not about the off-the-shelf behavior of Lotus Notes. – Richard Schwartz Nov 03 '15 at 20:39
-
1Richard's answer is correct, but I would avoid fiddling with different notes.ini, especially if you're going to distribute the application. If it's running only on one machine,though, fill your boots. @RichardSchwartz no disrespect! – Andrew Magerman Nov 04 '15 at 09:04
-
Yes, there has to be good reason. Back before location documents were added (R5??) we used to do this a lot, and it was definitely a bit of a minefield. (No disrespect taken.) – Richard Schwartz Nov 04 '15 at 14:39
1 Answers
The Notes APIs can be directed to use an alternate notes.ini file. The C API's NotesInit() call takes tradtional argc and argv arguments from the command line, and looks for an equal sign followed by a path to the notes.ini.
Since the Notes client is actually written with the Notes APIs, it actually uses the same technique. I.e.,
C:\> C:\IBM\Notes\notes.exe "=D:\Lotus Notes\Data\notes.ini"
And this applies to programs written with the Java and other langauge APIs as well. There are C API calls underneath all of them, so when those APIs make their calls to NotesInit() they pass in the command line arguments from their runtime environments. So all you should have to do is run your program with a command line argument specifying the notes.ini location after an equal sign.
Please note: the quotes that you see in the above syntax are important in case of spaces in the path.

- 14,463
- 2
- 23
- 41
-
How my application could read this param? Should I put in code something like proposed in this post http://stackoverflow.com/a/17634821/1333931 But when I use it, then it tries to open remotely (which doesn't work because of Domino server configuration). Is there any other way? I also tried to substitute original files with other (it works in that case) but it seems like temporary solution. – wbk Nov 04 '15 at 17:12
-
I think that you only need to do that if you are using NCSO.jar. I think that if you are using notes.jar, then when notes.jar loads the local nlsxbe.dll file it will get the command line from the JVM's runtime system and automatically pass it in. I'm not 100% sure of that, though. Just give it a try and see. – Richard Schwartz Nov 05 '15 at 01:23