sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #41750
Re: [Question #453396]: Unable to find click images when running jar packaged with images from eclipse
Question #453396 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/453396
Status: Answered => Open
Kamal is still having a problem:
Hi RaiMan , thanks for coming back.
I downloaded version 1.1.1 and added sikulixapi.jar. From eclipse I am still able to run fine .
But again when I package my Jar using eclipse option 1 ( Extract required libraries into generated jar). I keep on getting the below error. I tried changing JRE from 32 bit to 64 back forth but that also dint help. I am just not able to come around this error.
c:\Jobs\QuintiqAuto>java -jar QuintiqSikuli.jar
java.lang.RuntimeException: Failed to initialize BridJ (java.lang.UnsatisfiedLin
kError: org.bridj.Platform.init()V)
at org.bridj.Platform.initLibrary(Platform.java:444)
at org.bridj.Platform.<clinit>(Platform.java:228)
at org.bridj.BridJ.register(BridJ.java:191)
at org.sikuli.util.SysJNA$WinKernel32.<clinit>(SysJNA.java:25)
at org.sikuli.script.RunTime.addToWindowsSystemPath(RunTime.java:1016)
at org.sikuli.script.RunTime.libsExport(RunTime.java:974)
at org.sikuli.script.RunTime.init(RunTime.java:719)
at org.sikuli.script.RunTime.get(RunTime.java:296)
at org.sikuli.script.RunTime.get(RunTime.java:122)
at org.sikuli.script.RunTime.get(RunTime.java:321)
at org.sikuli.script.Region.<clinit>(Region.java:32)
at BusinessPriorityCodes.main(BusinessPriorityCodes.java:17)
Caused by: java.lang.UnsatisfiedLinkError: org.bridj.Platform.init()V
at org.bridj.Platform.init(Native Method)
at org.bridj.Platform.initLibrary(Platform.java:435)
... 11 more
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.bridj.Platform.si
zeOf_ptrdiff_t()I
------------------------
If I package my jar using option 2 ( Package required libraries into
extracted Jar) , I do not get the above error instead another error.
c:\Jobs\QuintiqAuto>java -jar QuintiqSikuli.jar
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa
der.java:58)
Caused by: java.lang.ExceptionInInitializerError
at BusinessPriorityCodes.main(BusinessPriorityCodes.java:17)
... 5 more
Caused by: java.lang.NullPointerException
at org.sikuli.script.RunTime.init(RunTime.java:639)
at org.sikuli.script.RunTime.get(RunTime.java:296)
at org.sikuli.script.RunTime.get(RunTime.java:122)
at org.sikuli.script.RunTime.get(RunTime.java:321)
at org.sikuli.script.Region.<clinit>(Region.java:32)
... 6 more
Exception in thread "Thread-0" java.lang.NoClassDefFoundError: org.sikuli.script
.Region
at org.sikuli.script.RunTime$1.run(RunTime.java:498)
Attached is my source code. The error is coming from line : Screen s = new Screen();
public static void main(String args[])
{
StartQuintiq();
Screen s = new Screen();
System.out.println("after launching screen");
//String mainfolder = "BusinessPriorityCodes";
String mainfolder = "";
String imgFolder = "imgs";
String JarFolder = (new StringBuilder(String.valueOf(mainfolder))).append(imgFolder).toString();
Settings.MoveMouseDelay = 0.0F;
try
{
if(ImagePath.add(JarFolder))
Debug.info("Image Folder in jar at: %s", JarFolder);
else
Debug.error("Image Folder in jar not possible: %s", JarFolder);
String pwd = "pwdBox.JPG";
Pattern pwdBox = new Pattern(pwd);
s.wait(pwdBox, 60D);
s.click(pwdBox);
Settings.TypeDelay = 0.0D;
s.type(null, "CronTab667!", 0);
s.click("LoginButton.JPG", Integer.valueOf(0));
s.wait("MainPage.JPG", 120D);
s.click("ChooseAppointment.JPG");
s.type("\uE002");
s.wait("ChooseAppointmentID.JPG");
s.click("ChooseAppointmentID.JPG");
s.click("ClearSearch.JPG");
s.wait("DataLoaded.JPG", 30D);
s.rightClick("DataLoaded.JPG");
s.wait("Export.jpg", 30D);
s.click("Export.jpg");
s.wait("ExportOK.jpg", 30D);
s.click("ExportOK.jpg");
s.waitVanish("ExportWindow.jpg", 30D);
try
{
Thread.sleep(1000L);
}
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.