Java project: runnable jar: Tesseract library problems:

Asked by Somnath on 2020-06-22

I have used the below code to obtain the text to the right of an image in my screen and print it.
I don't have any issues while running in Eclipse.

          String FinalText = null;
          while (FinalText == null) {
          String foundText = s.find(total).right(200).text();
          FinalText = foundText.trim();

BUT WHEN I SAVE IT AS A RUNNABLE JAR FILE AND TRY TO RUN IT FROM CMD PROMPT I FACE THE FOLLOWING ERROR:

[error] see: https://github.com/RaiMan/SikuliX1/wiki/Windows:-Problems-with-libraries-OpenCV-or-Tesseract
[error] Save your work, correct the problem and restart the IDE!
Exception in thread "main" org.sikuli.script.SikuliXception: OCR: start: Tesseract library problems: The specified module could not be found.
at org.sikuli.script.TextRecognizer.getTesseractAPI<TextRecognizer.java:111>
at org.sikuli.script.TextRecognizer.doRead<TextRecognizer.java:350>
at org.sikuli.script.TextRecognizer.readText<TextRecognizer.java:309>
at org.sikuli.script.OCR.readText<OCR.java:682>
at org.sikuli.script.OCR.readText<OCR.java:670>
at org.sikuli.script.Element.text<Element.java:147>
at Logging.PriceQuantity_report<Logging.java:16>
at Scenarios.PriceQuantity_Articles<Scenarios.java:38>
at cimpleRun.main<simpleRun.java:21>

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2020-06-22
Last reply:
2020-06-25
RaiMan (raimund-hocke) said : #1

what version of SikuliX?

Somnath (somnath89) said : #2

@RaiMan 2.0.3

RaiMan (raimund-hocke) said : #3

There must be something wrong with your java classpath, when running the "RUNNABLE JAR FILE" from commandline.

Can you help with this problem?

Provide an answer of your own, or ask Somnath for more information if necessary.

To post a message you must log in.