sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #58247
[Question #701300]: Exception in thread "main" java.lang.NoSuchMethodError: com.sun.jna.Native.load(Ljava/lang/String; Ljava/lang/Class; Ljava/util/Map; )Lcom/sun/jna/Library;
New question #701300 on SikuliX:
https://answers.launchpad.net/sikuli/+question/701300
Using the Below Code, trying to Get the Text() of the Region.
import org.sikuli.basics.Settings;
import org.sikuli.script.Region;
public class Sikuli_Add {
public static void main(String[] args) {
try {
Settings.OcrTextRead=true;
Region beginRegion2 = new Region(38, 234, 66, 27);
beginRegion2.highlight(3);
String Text=beginRegion2.text().trim();
System.out.println(Text);
}
catch (Exception e) {
System.out.println("Catch block");
}
}
But it states With Following Error:
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS:
20:54:23:097 >> Loading UFT Java Support (version 15.0.2.0) (Oracle Corporation, 1.8.0_212)
[log] highlight R[38,234 66x27]@S(0) for 3.0 secs
Exception in thread "main" java.lang.NoSuchMethodError: com.sun.jna.Native.load(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Map;)Lcom/sun/jna/Library;
at org.sikuli.natives.SXUser32.<clinit>(SXUser32.java:13)
at org.sikuli.natives.WinUtil.<clinit>(WinUtil.java:37)
at org.sikuli.script.support.RunTime.addToWindowsSystemPath(RunTime.java:1647)
at org.sikuli.script.support.RunTime.libsExport(RunTime.java:1590)
at org.sikuli.script.support.RunTime.libsLoad(RunTime.java:1407)
at org.sikuli.script.support.RunTime.loadLibrary(RunTime.java:1619)
at org.sikuli.script.Finder$Finder2.<clinit>(Finder.java:571)
at org.sikuli.script.TextRecognizer.<init>(TextRecognizer.java:87)
at org.sikuli.script.TextRecognizer.start(TextRecognizer.java:112)
at org.sikuli.script.TextRecognizer.doOCR(TextRecognizer.java:342)
at org.sikuli.script.TextRecognizer.doOCR(TextRecognizer.java:337)
at org.sikuli.script.Region.text(Region.java:4913)
at com.lh.mpg.manager.Sikuli_Add.main(Sikuli_Add.java:16)
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:"C:\Program Files (x86)\Micro Focus\Unified Functional Testing\bin\java_shared\classes\jasmine.jar"
Sikuli jar Used are: sikulix-2.0.0.jar & sikuliapi-2.0.0.jar
JNA Jars used: jna-5.11.0 & jna-platform-5.11.0 (Updating & Removing JNA Jars Same Result).
Please Give a solution for my question, Thanks in advance.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.