[Java] Apache Ant: ExceptionInInitializerError using Sikuli --- global path settings not recognized
*** the solution ***
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.
<env key="Path" path="$
</exec>
-------
I'm trying to run some simple Sikuli code through java, and I get an exception when Sikuli is being initialized. The following is logged.
Windows utilities loaded.
Sikuli vision engine loaded.
Text Recgonizer inited.
Then I get the stack trace below.
N/A
java.lang.
at org.sikuli.
at org.sikuli.
at org.sikuli.
at org.sikuli.
at org.sikuli.
at org.sikuli.
at com.hmh.
at com.hmh.
at java.lang.
Caused by: java.lang.
at java.io.
at java.io.
at org.sikuli.
at org.sikuli.
at org.sikuli.
at org.sikuli.
at org.sikuli.
at org.sikuli.
The code triggering the exception is given below. Line 97 that generates the exception is the screen.click() statement
Screen screen = new Screen();
screen.
I have done all the pre-requisites as suggested.
1. sikuli-script.jar is in the classpath
2. C:\Program Files\Java\
I have a python script of the same code. It runs from the command line with the following command.
java -jar target\
The environment details are given below
OS: Win XP (SP3)
Java: 6
Sikuli: Sikuli-
Please help me resolve the issue. I need the code to run from Java since it is within a test case already automated using Selenium RC.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Chaminda Peiris
- Solved:
- Last query:
- Last reply: