我已经使用java application创建了sikuli-script(latest version 1.0.1)。
我将sikuli-script.jar添加到Referenced Libraries中(使用这个答案应答链接进行配置)
java code文件夹结构->

Java code -->
package com.example.sikuli;
import org.sikuli.script.*;
import java.util.concurrent.TimeUnit;
public class TestSikuli {
public static void main(String[] args) {
Screen s = new Screen();
App app = new App("C:/Program Files/Mozilla Firefox/firefox.exe");//firefox path
try{
app.focus();
TimeUnit.SECONDS.sleep(2);
s.click("imgs/1391152193781.png", 0);//url bar image
s.type(null, "http://www.google.lk", 0);
s.click("imgs/1391152289812.png", 0);//click search image
}
catch(FindFailed e){
e.printStackTrace();
}
}
}之后,我设置了Run Configutrtion,如PATH和SIKULI_HOME

接下来,我运行代码,它正常工作。
然后,我使用.exe创建launch4j,并按照这个站点的说明-> 如何从Eclipse创建可执行文件
在此之后,我从.exe运行command prompt文件,然后发生以下错误。请帮帮我。
Error -->
[error] ResourceLoaderBasic: check: libs dir is empty, has wrong content or is outdated
[action] ResourceLoaderBasic: check: Please wait! Trying to extract libs to: C:\Documents and Settings\Dell\SikuliX\libs
[error] ResourceLoaderBasic: loadLib: Fatal Error 109: not found: C:\Documents and Settings\Dell\SikuliX\libs\VisionProxy.dll
[error] Terminating SikuliX after a fatal error(109)! Sorry, but it makes no sense to continue!
If you do not have any idea about the error cause or solution, run againwith a Debug level of 3. You might paste the output to the Q&A board.发布于 2014-02-11 09:05:03
--1。在使用Sikuli进行Java编程时,您应该始终使用sikuli-java.jar (sikuli-ide.jar包含许多这里不需要的内容)。
-2在运行exe时设置一个JVM选项-Dsikuli.Debug=3,以获得有关发生什么的更多详细信息。我猜问题是,出于某种原因,本机库的导出在launch4J exe的上下文中不起作用(我还没有测试这个)。
-3。始终使用最新版本(在本例中为1.1.1,仍在夜间,但在决赛前;-) http://sikulix.com
https://stackoverflow.com/questions/21621000
复制相似问题