// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.Variant;

public class TestJava {
    public static void main(String[] args) {
        System.out.println("COM/Java with Jacob ActiveXComponent");
        ActiveXComponent test = new ActiveXComponent("Test.CoTest");
        System.out.println("123 + 456 = " + test.invoke("Add", new Variant(123), new Variant(456)).getInt());
        System.out.println("ABC + XYZ = " + test.invoke("Concat", new Variant("ABC"), new Variant("XYZ")).getString());
    }
}
