3
votes

I would like to know if through Domino API it is possible to launch (start) Lotus or open a lotus notes email knowing the noteURL.Something like this

notes:///__C12579A3004143A1.nsf/0/07A2154411B264E5C12579A4004AD43E?OpenDocument

without specifying the path of the executable that is the notes.exe file.

For the moment, I using this java command

Runtime.getRuntime().exec( "C:\Program Files\IBM\Lotus\Notes\notes.exe " + document.getURL() );

but I don't want to specify the path to the executable.

Thanks

3

3 Answers

2
votes

You can on a Windows machine. When you install the Lotus Notes client on a windows PC, it registers the notes:// protocol and associates it with notes.exe. You can then use a URL formatted as notes://server/database.nsf/view/docid to launch Notes and open a particular document.

1
votes

The java.awt.Desktop class has a browse(URI uri) method. The doc says that it launches the 'default browser', but it's unclear to me whether it will handle "notes://" URIs. That's what I might try, as I think it has the best chance of being a cross-platform solution.

If Windows-only meets your requirements, though, and if hard-coding the executable path is your real concern, then you can read it from the registry. The appropriate registry keys to use, and a method for reading the registry from Java are both covered in answers to other questions on stackoverflow:

0
votes

You could use a .NDL (Notes Data Link) file and "start" that. If the Notes Client is properly installed, it should open automatically.

Steps to create a .NDL file:

  1. Open a Notes database.
  2. Select Edit -> Copy As Link and select the type of link you want to create, for example a View link.
  3. Open the Windows Notepad and select Edit -> Paste.

The following is an example of what the Notepad file will look like:

discuss - By Category (discuss is the Notes Database name and "By Category" is the view link)
<NDL>
<REPLICA 852565A7:005180C7>
<VIEW OFAAC7D56C:A8FD884B-ON852563BE:00610639>
<HINT>CN=Slider.lotus.com/O=WWBPSS</HINT>
<REM>discuss</REM>
</NDL>

Source: How to start a Notes client from a browser or send doclinks to non-Notes users