免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1747 | 回复: 0
打印 上一主题 下一主题

[Lotus] 如何调试java库中的代码 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-01-11 15:40 |只看该作者 |倒序浏览
各位 :
   我想请教一下,我在java库里写了一段代码,如下 :
import lotus.notes.*;
import java.awt.event.*;
import java.awt.*;

public class SendMemo extends Frame implements ActionListener
{
        boolean didInit=false;
        Button b;
       
        public SendMemo(String title)
        {
         super(title);
         b=new Button("Send memo");
         b.addActionListener(this);
         add(b);
        addWindowListener(new WindowAdapter()
         {
           public void windowClosing(WindowEvent evt)
             {
                System.exit(0);
             }
          });
       }
      
        public void actionPerformed(ActionEvent evt)
        {  
         if(evt.getSource().equals(b))
          {
        try
          {
            NotesThread.sinitThread();
            didInit=true;
             Session s=Session.newInstance();
             Registration reg=s.createRegistration();
             String username=reg.switchToID("C:\\Lotus\\notes\\data\\user.id","lotusnotes");
             DbDirectory dir=s.getDbDirectory("");
             Database db=dir.openMailDatabase(s);
             Document doc=db.createDocument();
             doc.appendItemValue("Form","Memo");
             doc.appendItemValue("Subject","hello");
             doc.appendItemValue("Body","just testing ....");
             doc.send("admin@sf.com");
           }
        catch(NotesException e)
           {
            e.printStackTrace();
           }
           finally{
            if(didInit)
              {
                NotesThread.stermThread();
              }
           }
         }
  }
  public static void main(String[] args)
   {
     SendMemo app=new SendMemo("SendMemo");
        app.setSize(200,100);
        app.setVisible(true);
    }
}

而且编译成功了,但是我不知道通过什么调试或其他设置来显示它的按钮及功能!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP