Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, July 25, 2019 3:20:27 PM(UTC)
Christopher Thompson

Groups: Tech Support, Administrators
Posts: 60

Was thanked: 2 time(s) in 2 post(s)

In the below example we are working in the Eclipse IDE

In order to access the LEADTOOLS Libraries and utilize the various calls and functionality,
you will need to pass them through the RasterSupport.setLicense() method for validation.

Below is an example of this code being set, along with the required references and imports:

Code:
import leadtools.*;

public class simpleOcr {
	
	public static void main(String[] args) {
		try {
			Platform.setLibPath("C:\\LEADTOOLS 20\\Bin\\CDLL\\x64");
			
			Platform.loadLibrary(LTLibrary.LEADTOOLS);
			Platform.loadLibrary(LTLibrary.CODECS);
			
			String licensePath = "ENTER FILE PATH TO LICENSE HERE";
			String developerKey = "ENTER STRING FROM KEY HERE"; 
			
			// Set your license
			RasterSupport.setLicense(licensePath, developerKey);

			//License expired check
			if (RasterSupport.getKernelExpired()) {
				System.out.println("License NOT Set Successfully");
			} else {
				System.out.println("License Set Successfully");
			}
		}
		catch (Exception ex) {
			ex.printStackTrace();
		}
	}
}
Chris Thompson
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.057 seconds.