sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #00777
Re: [Question #142062]: ExceptionInInitializerError when running Sikuli code through Java
Question #142062 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/142062
Status: Needs information => Solved
Chaminda Peiris confirmed that the question is solved:
Did a lot of digging and finally got to the bottom of it....
as you suggested I got the two lines extracted the main() method of a
class and ran it through the command line. It worked. So that means the
problem was in my project settings. I use Apache Ant to build and run
the tests. It turned out that even though the PATH is correctly set on
the shell running the ant command, AN does not pass it correctly.
Therefore I had to modify the ant target to manually set it.
<exec executable="java">
<arg line="-cp ${sikuli.classpath} com.hmh.qa.test.TestCycleTest"/>
<env key="Path" path="${env.Path}${path.separator}${jre.bin}${path.separator}${sikuli.dir}/lib"/>
</exec>
I also modified the code to set the image path.
ImageLocator imageLocator = new ImageLocator();
imageLocator.addImagePath("file:///c:/imgs");
screen.click("English.png", 0);
Everything works now.
To answer your final question, I have not used SiKuli before.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.