2016-08-07 16 views
0

Ich erhalte eine Ausnahme, wenn Autoit mit Maven-Projekt instanziieren, dass mit Java-Projekt (mit Build-Pfad) gibt es keine Ausnahme!Wie wird AutoIt mit Maven-Projekt verwendet?

String jacobDllVersionToUse = "jacob-1.18-x64.dll"; 
File file = new File("lib", jacobDllVersionToUse); 
System.setProperty(LibraryLoader.JACOB_DLL_PATH, file.getAbsolutePath()); 
engine = new AutoItX(); 

Meine Ausnahme:

java.lang.NoSuchFieldError: m_pDispatch 
at com.jacob.com.Dispatch.createInstanceNative(Native Method) 
at com.jacob.com.Dispatch.<init>(Dispatch.java:101) 
at com.jacob.activeX.ActiveXComponent.<init>(ActiveXComponent.java:58) 
at autoitx4java.AutoItX.<init>(AutoItX.java:231) 
at utils.AutoIt.init(AutoIt.java:28) 
at utils.AutoIt.<init>(AutoIt.java:17) 
at utils.AutoIt.getInstance(AutoIt.java:33) 
at utils.AutoIt.engine(AutoIt.java:39) 
at utils.AutoItAPI.run(AutoItAPI.java:36) 

Antwort

0

Dies ist Kompatibilitätsprobleme zwischen jacob oder autoITDLL. Ich habe dieses Problem mit der Version 1.16 von jacob dll behoben. Es funktioniert gut für mich.