java调用com组件com4j
2020-12-13 15:37
                         标签:-o   tor   ever   public   obj   mic   color   ring   test    A Java library that allows Java applications to seemlessly interoperate with Microsoft Component Object Model. First generate Java type definitions from a COM type library. Here we are doing for the type library for the Windows Scripting Host.  代码:   java调用com组件com4j 标签:-o   tor   ever   public   obj   mic   color   ring   test    原文地址:https://www.cnblogs.com/nanfei/p/11613665.htmlcom4j
> java -jar tlbimp.jar -o wsh -p test.wsh %WINDIR%\system32\wshom.ocx
public class Main {
  public static void main(String[] args) {
    IFileSystem3 fs = ClassFactory.createFileSystemObject();
    for( String file : args )
      System.out.println(fs.getFileVersion(file));
  }
}