我有一个用 Java 编写的 Lotus Notes 代理,它应该在通过单击 Notes 客户端中的按钮执行后向用户弹出一条消息。尝试显示弹出窗口会导致我在 Java 调试控制台中看到的错误:
java.security.AccessControlException: Access denied (java.lang.RuntimePermission exitVM.0)
at java.security.AccessController.checkPermission(AccessController.java:108)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:544)
at COM.ibm.JEmpower.applet.AppletSecurity.superDotCheckPermission(AppletSecurity.java:1449)
at COM.ibm.JEmpower.applet.AppletSecurity.checkRuntimePermission(AppletSecurity.java:1311)
at COM.ibm.JEmpower.applet.AppletSecurity.checkPermission(AppletSecurity.java:1611)
at COM.ibm.JEmpower.applet.AppletSecurity.checkPermission(AppletSecurity.java:1464)
at java.lang.SecurityManager.checkExit(SecurityManager.java:756)
at java.lang.Runtime.exit(Runtime.java:99)
at java.lang.System.exit(System.java:279)
at ClipboardTest.main(Unknown Source)
at JavaAgent.NotesMain(Unknown Source)
at lotus.domino.AgentBase.runNotes(Unknown Source)
at lotus.domino.NotesThread.run(Unknown Source)
我的代理代码是
import lotus.domino.*;
import javax.swing.JOptionPane;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// (Your code goes here)
Document cdoc = agentContext.getDocumentContext();
String[] notesURL = new String[] {cdoc.getNotesURL()};
ClipboardTest.main(notesURL);
JOptionPane.showMessageDialog(null,"message","title",JOptionPane.WARNING_MESSAGE);
} catch(Exception e) {
e.printStackTrace();
}
} }
我有对数据库的管理员访问权限。什么可能导致此错误?