java 调用 com 组件 随笔

来源:互联网 发布:mac系统有什么优势 编辑:程序博客网 时间:2024/06/03 06:42

1.不要下1.16,这版本缺少文件,能编译不能运行。天知道我怎么一开始就点了这么个版本尴尬,后面改用1.15就好了,安装什么的网上找。

2.注意创建的参数,interface ? class ? clsid(progid) ?  ...

3.ActiveXComponent sc = new ActiveXComponent("xxx.xxx");Dispatch dtm = sc.getObject();//interface

4.Dispatch dtm = new Dispatch("xxx.xxx");

方法3,4任选其一。