java 如何和 winmail 整合
如何实现某系统(JSP项目)注册或修改 winmail 上的用户
看了 winmail 的帮助文档,说是提供了 MailServerCtrl.dll
然后 newObject.CreateObject("MailServerCtrl.MailDBInterface") 就可以调用 dll 里的方法,来实现用户注册等功能
但只提供了 php 和 .net 的例子,而无 JAVA 例子
下面是我的两个实验:
1、
网上找到篇帖子http://topic.csdn.net/u/20070806/08/257694EE-3F84-4ED9-BA9D-809078007F82.html
仿佛是用 jcom 来调用上面的接口,代码如下:
System.runFinalizersOnExit(true); ActiveXComponent mf=new ActiveXComponent( "MailServerCtrl.MailDBInterface ");//找到组件 Object myCom=mf.getObject();//生成一个对象 Dispatch.call(myCom,method,param...); //example Dispatch.call(myCom, "AddUser/方法 ", "参数1 ", "参数2 ", "参数3 ");
public class Winmail { static{ System.loadLibrary("MailServerCtrl"); } public native String GetDBPath(); public static void main(String[] args) { Winmail win = new Winmail(); System.out.println(win.GetDBPath());// java.lang.UnsatisfiedLinkError }}