⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dispatchtest.java

📁 java 与COM组件的连接桥
💻 JAVA
字号:
package com.jacob.com;

import java.util.Date;

/**
 * Test some of the Dispatch utility methods 
 * May need to run with some command line options (including from inside Eclipse).  
 * If so, then try these
 * <pre>
 *      -Djava.library.path=d:/jacob/release/x86 
 *      -Dcom.jacob.autogc=false 
 *      -Dcom.jacob.debug=false 
 *      -Xcheck:jni
 *  </pre>
 */
public class DispatchTest {

    public static void main(String[] args) 
    {
    	Date testDate = new Date();
    	Variant fromDate = Dispatch.obj2variant(testDate);
    	Date returnedDate = fromDate.getJavaDate();
    	System.out.println("test date is "+testDate);
    	System.out.println("VariantDate is "+fromDate.getJavaDate());
    	if (testDate.equals(returnedDate)){
    		
    	} else {
    		System.out.println("Could not call obj2variant(Date) and get it to work");
    	}
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -