Lotus Notes Java应用程序找不到notes.ini [英] Lotus Notes Java app can’t find notes.ini

查看:188
本文介绍了Lotus Notes Java应用程序找不到notes.ini的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所描述的系统都是带有Lotus Notes 8.5的Windows XP。

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

我有一个Java应用程序(下面的示例代码),它使用notes.jar与Lotus Notes交互。该应用程序在的Lotus安装目录中具有 notes.ini 的系统上正常运行c:\Program Files \ Lotus \ Notes 并且用户ID文件位于 c:\Program Files \ Lotus \ Notes \ Data 。用户必须输入密码才能登录Lotus。此系统已将 HKLM \Software\Lotus \Notes \ ManyUser 设置为 0 (单用户系统) 。在这台机器上,下面的代码在四个 println 上显示了良好的值。

I have a Java app (sample code below) that uses notes.jar to interact with Lotus Notes. The app works fine on a system that has notes.ini in the Lotus install dir of c:\Program Files\Lotus\Notes and the user ID file is in c:\Program Files\Lotus\Notes\Data. The user has to type a password to login to Lotus. This system has HKLM\Software\Lotus\Notes\MultiUser set to 0 (single user system). On this machine, the below code displays good values on the four println’s.

在问题系统上,这个应用程序打印四个标题,但空白四个值(用户名,密钥文件名,邮件文件和邮件服务器都是空白)。此问题系统有 notes.ini 中的用户ID文件D:\ Data\johnsmith \NotesData 。 Lotus安装在 C:\Program Files \ Lotus \Notes 中。此问题系统还有 HKLM \Software\Lotus \Notes \MultiUser 设置为 1 (暗示它是多用户而不是单个用户)。最后,在Lotus的文件 - >安全 - >用户安全对话框中,选中使用您的操作系统登录登录到Notes框(因此用户不输入密码登录Lotus)。

On a problem system, this app prints the four headings but blanks for the four values (the user name, key filename, mailfile, and mailserver are all blank). This problem system has notes.ini and the user ID file in D:\Data\johnsmith\NotesData. Lotus is installed in C:\Program Files\Lotus\Notes. This problem system also has HKLM\Software\Lotus\Notes\MultiUser set to 1 (implying it is multiuser instead of single user). Finally, under Lotus’s File -> Security -> User Security dialog the "Log in to Notes using your operating system login" box is checked (so the user doesn’t type in a password to login to Lotus).

因此,似乎在问题系统上找不到 notes.ini 文件(因为 notes.ini 是应从中读取四个输出值的位置)。我查看了 Notes.jar API并且看不到任何方法来指定 notes.ini的位置 notes.ini 所在的目录位于Windows PATH 中,但这没有帮助。

So, it appears that on the problem system, the notes.ini file can’t be found (since notes.ini is where the four output values are supposed to be read from). I’ve looked through the Notes.jar API and can’t see any way to specify the location of notes.ini. The dir where notes.ini resides is in the Windows PATH, but that doesn’t help.

任何帮助都将不胜感激。

Any help would be appreciated.

import java.io.*;
import lotus.domino.*;

public static void main(String[] args) throws IOException {
  try {
    NotesThread.sinitThread();
    Session session = NotesFactory.createSession();

    System.out.println("Common user name: " + session.getCommonUserName());
    System.out.println("KeyFilename: " + session.getEnvironmentString("KeyFilename", true));
    System.out.println("MailFile: " + session.getEnvironmentString("MailFile", true));
    System.out.println("MailServer: " + session.getEnvironmentString("MailServer", true));
  } catch (Exception ex) {
    ex.printStackTrace();
  } finally {
    NotesThread.stermThread();
  }
}


推荐答案

As在原始问题中提到,如果 HKEY_LOCAL_MACHINE \Software\Lotus\Notes\MultiUser 的值为 1 ,然后你有一个多用户安装(即使你是Lotus的唯一用户)。

As mentioned in the original question, if HKEY_LOCAL_MACHINE\Software\Lotus\Notes\MultiUser has a value of 1, then you have a multi-user installation (even if you are the only user of Lotus).

这是一个有效的解决方案。找到 Notes.ini 的位置,可能是 C:\Documents and Settings \(用户名)\ Lotus 。编辑或创建下面的字符串值,并将其设置为 Notes.ini 目录。 HKEY_CURRENT_USER \Software\Lotus \Notes \(可选版)\ NotesIniPath

Here is a solution that worked. Find the location of Notes.ini, probably somewhere like C:\Documents and Settings\(username)\Lotus. Edit or create the string value below and set it to your Notes.ini directory. HKEY_CURRENT_USER\Software\Lotus\Notes\(optional-version)\NotesIniPath.

In在多用户环境中,Lotus Notes从 NotesIniPath 注册表值中获取 ini 文件名。

In a multi-user environment, Lotus Notes gets the ini filename from the NotesIniPath registry value.

这篇关于Lotus Notes Java应用程序找不到notes.ini的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆