This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Using Tesseract OCR with Eclipse  RSS feed

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have written a small wrapper, that allows me to execute the optical character recognition program, Tesseract. So my Projects tab looks like:-

Capture1.JPG
[Thumbnail for Capture1.JPG]
Projects Tab
Capture2.JPG
[Thumbnail for Capture2.JPG]
 
Jeremy Watts
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SOrry just posted something prematurely, and couldn't find the Edit option. My question is this. You see the Tesseract folder in the Projects tab there? That folder contains the executable file tesseract.exe that the wrapper actually uses. If you view the code photo, then that path is explicitly stated within it. Is there a way of somehow getting Eclipse to execute the executable without explicitly stating the path? I am concerned about using this on a different machine & therefore having to change the path each time it is used elsewhere.

Thanks
Jeremy
 
Sheriff
Posts: 5113
138
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure this is an Eclipse question per se, but here are some thoughts.

* Don't use "C:\\etcetera" or your project will be tied to Windows.  (But since you're using an .exe file, maybe that's not an issue.)
* In general, just use slashes (/) for path separators.
* I don't know how the String path is being used in the Scan class, so it's hard to advise.
* Getting the launching of an outside executable right in Java is very hard.
* Specific to Eclipse: right-click on the folder then select Build Path -> Use as Source Folder.
* Another consideration is how you intend to distribute this project.  Executable jar file?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!