1、test.py内容如下:
#!/usr/bin/python
#coding=utf-8
from jpype import *
startJVM("/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server/libjvm.so","-ea","-Djava.class.path=/opt/sikuli/Sikuli-X-1.0rc3 (r905)-linux-x86_64/Sikuli-IDE/sikuli-script.jar")
App = JClass('org.sikuli.script.App')
Screen = JClass('org.sikuli.script.Screen')
Screen.doubleClick("/root/ETSixAErootB.png")
Screen.click("/root/YQ.png")
shutdownJVM()
2、执行python test.py时,报错RuntimeError: No matching overloads found. at src/native/common/jp_method.cpp:121
3、经google后,找到解决方法,如下:
Screen = JClass('org.sikuli.script.Screen')
screen=Screen()
screen.doubleClick("/root/ETSixAErootB.png")
screen.click("/root/YQ.png")
4、更改以上内容后再执行可以成功执行
阅读(8072) | 评论(0) | 转发(0) |