Run the Java sample applications
Once code sample files are copied, do the following to compile and run the Java sample applications.
Running the Java sample application requires OpenJDK 8 installed. Refer to the OpenJDK website for details.
-
Run the following command to set the JAVA_HOME environment
variable:
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
-
Change to the working directory.
cd ~/sample/java
-
Compile the application.
$JAVA_HOME/bin/javac -classpath /usr/local/lib/omnipage-csdk-lib64-22.0/csdk_omnipage.jar JavaSamples/*
-
Run the required samples. The following command runs sample 1:
$JAVA_HOME/bin/java -cp /usr/local/lib/omnipage-csdk-lib64-22.0/csdk_omnipage.jar:. JavaSamples.JavaSamples -input /usr/local/src/omnipage-csdk-22.0/input 1