[HowTo] access Java classes when using one's own jars in Sikuli scripts
**** SOLUTION
see comment #9
If you need more java classes, that are referenced from inside java code, you need to use another startup version:
java -cp jar1;jar2;
or using the IDE
java -cp jar1;jar2;
If you want to use the IDE GUI this way, you need additional Java options:
java -Xms64M -Xmx512M -Dfile.
on Mac and Linux the classpath separator is the colon :
-------
I want to invoke a web service in Sikuli. And I have done the following things:
*Use Apache Axis2(wsdl2java) to generate Java code from the web service.
*Write my Java code to invoke the generated code by wsdl2java.
*Test my code in Eclipse, pass.
*Test my code in cmd(java -jar xx.jar), pass.
But when I use it in Sikuli, the problem occurs.
Part of the Sikuli code is like:
load('myown.jar')
load('axis2.jar')
load('other.jar')
from mypackage import MyClass
MyClass().method()
The exception is:
at org.apache.
at org.apache.
at org.apache.
at org.apache.
at org.apache.
at org.apache.
at com.wilson.
at com.wilson.
at com.wilson.
at com.wilson.
at com.wilson.
at com.wilson.
at sun.reflect.
at sun.reflect.
at sun.reflect.
at java.lang.
org.apache.
Seems that the classpath is not set correctly. I tried to modify the Sikuli-IDE-w.bat, adding '-classpath xxx' to the last 'start' line. But it still failed.
So I want to know how to make this running correctly.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: