我的程序需要把word的文字导入显示到JTextPane里面.我的jdk是1.6,我下载的是jacob1.12,但是我编写了一个测试程序没有通过编译!究竟是我的jacob版本问题还是我的程序的问题??请高手帮忙,急啊!!!import com.jacob.com.*;
import com.jacob.activeX.*; 
public class TestDoc { /**
 * @param args
 */
public static void main(String[] args) {
// TODO Auto-generated method stub
String inFile = "c:\\test.doc";
String tpFile = "c:\\temp.html";
String otFile = "c:\\temp.xml";
boolean flag = false;
ActiveXComponent app=new ActiveXComponent("Word.Application");
app.setProperty("Visible", new Variant(false));
Dispatch docs = app.getProperty("document.").toDispatch();
Dispatch doc = Dispatch.invoke(docs,"Open", Dispatch.Method, new Object[]{inFile,new Variant(false), new Variant(true)}, new int[1]).toDispatch();
Dispatch.invoke(doc,"SaveAs", Dispatch.Method, new Object[]{tpFile,new Variant(8)}, new int[1]);
Variant f = new Variant(false);
Dispatch.call(doc, "Close", f);
flag = true;
app.invoke("Quit", new Variant[] {});
}}