1

I need a step to step on how to plug tess4j to Eclipse. I found this online:

  1. creating a lib directory and copied the tess4j.jar and its required jar in;
  2. added the jars to build path
  3. copied the tessdata directory and tessdll.dll file into the project root directory.

Now it just works.

I only know basic Java so I have no idea what creating a lib directory and copy directory file means at all. Can someone help me to plug this library and make it work for eclipse because I am working in a project that needs ocr.

siegi
  • 5,646
  • 2
  • 30
  • 42
PrettyGirl
  • 31
  • 1
  • 2

1 Answers1

2

creating a lib directory and copied the tess4j.jar and its required jar in;

A JAR (Java ARchive) file is a collection of compiled Java classes. This is the usual way to distribute Java libraries. You should create a new folder in your project (right click your project, "New", "Folder") and copy/move the JAR you downloaded to this newly created directory. If tess4j has dependencies, i.e. needs other JARs to work, you have to put them in this directory.

added the jars to build path

You need to tell Eclipse to add the JARs to the build path, i.e. Eclipse needs to know where to get the tess4j classes from. Locate the lib folder and select all JAR files. Right click them and select "Build Path", "Add to Build Path".

copied the tessdata directory and tessdll.dll file into the project root directory.

Should be clear ;-)

siegi
  • 5,646
  • 2
  • 30
  • 42
  • Can someone tell me how to put a "2." before "added the jars to build path"? It always automatically starts a new enumeration starting with "1.". – siegi Jun 18 '12 at 04:26
  • @PrettyGirl If my answer helped you and answers your question, you can accept it by clicking the checkmark on the top left. See [the FAQ section about asking questions](http://stackoverflow.com/faq#howtoask). Thanks :-) – siegi Jun 18 '12 at 20:09
  • There's a similar post recently: http://stackoverflow.com/questions/10815978/including-tess4j-to-a-java-project-as-library-in-eclipse – nguyenq Jun 19 '12 at 03:22
  • yes I am aware of that but I didn't think the answer was too straight fwd for a beginner. But don't worry it's finally working. – PrettyGirl Jun 19 '12 at 23:09