Java project: runnable jar: Tesseract library problems:

Asked by Somnath

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:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

what version of SikuliX?

Revision history for this message
Somnath (somnath89) said :
#2

@RaiMan 2.0.3

Revision history for this message
RaiMan (raimund-hocke) said :
#3

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

Revision history for this message
Nikhil Tyagi (iamnikihltyagi) said :
#4

Hey
I got the same error im my program
How can I fix this

Revision history for this message
Nikhil Tyagi (iamnikihltyagi) said :
#5

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:691) at org.sikuli.script.OCR.readText(OCR.java:679) at org.sikuli.script.TextRecognizer.doOCR(TextRecognizer.java:408) at com.crestech.opkey.plugin.visualscriptplugin.library.OCRv2.performOCROnImage(OCRv2.java:22) at com.crestech.opkey.plugin.visualscriptplugin.library.OCR.Method_readTextFromImage(OCR.java:28)

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.