import java.io.File;

import javax.swing.JOptionPane;

import net.sourceforge.tess4j.Tesseract;
import net.sourceforge.tess4j.TesseractException;

public class OCRPrueba {
	public static void main (String[]args){

		Tesseract instance = new Tesseract();
		String resultado=null;
		try {
			resultado = instance.doOCR(new File("temp.gif"));
		} catch (TesseractException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		JOptionPane.showMessageDialog(null, resultado);
	}
}
