For Linux, See the Developer’s Help of the Linux distribution for the full list. One notable limitation is that objects implementing IEngineLoader are not available on Linux or macOS (See Differences between ABBYY FineReader Engine 12 for Windows and Linux).
Adding FineReader Engine library to a Java project
ABBYY FineReader Engine includes a com.abbyy.FREngine-%BUILD_ID%.jar file, which contains the Java class library for FineReader Engine. You can find it in the Inc/Java folder. The path to this file can be specified in the classpath parameter in the command line and in project settings in different Java development environments. Example:Loading and unloading FineReader Engine
You can use the static Engine class to load the Engine object. The Engine class provides methods that correspond to the ABBYY FineReader Engine functions for loading and unloading the Engine:Sample code
Sample code
The com.abbyy.FREngine-%BUILD_ID%.jar file is a self-unpacking archive which is unpacked on your machine the first time you use FineReader Engine Java API. The default folder where the contents are unpacked is Inc/Java. If you need to use another folder, call the Engine.SetJNIDllFolder method before loading the Engine by any of the methods described above. To find out which folder is currently set for unpacking the archive, call the Engine.GetJNIDllFolder.
Handling errors
ABBYY FineReader Engine can throw the exceptions of the following types:- java.lang.OutOfMemoryError
- com.abbyy.FREngine.EngineException
Calling methods with out-parameters
There are several methods in ABBYY FineReader Engine API which have out-parameters that receive a new value after the method call and must be passed by reference. These parameters are marked in the type library and in descriptions of methods in this Developer’s Help as [out] or [in, out]. When working with ABBYY FineReader Engine in Java, you have to use a special Ref class to pass a parameter by reference. See examples below. Example in which the out-parameters are passed by reference to the IFRPage::FindPageSplitPosition method:Sample code for out-parameters
Sample code for out-parameters
Sample code for in/out parameters
Sample code for in/out parameters
Collecting garbage
FineReader Engine supports working with the AutoCloseable interface, which allows you to use the try statement to access the resources allocated for objects. It means that once the try block reaches the end, all allocated resources will be closed automatically, without explicitly calling closure methods. We recommend that you use the try statement for all objects in your code (see the example below):Sample code
Sample code
