LEADTOOLS Support
Document
Document SDK FAQ
HOW TO: Set a LEADTOOLS License in Java
Groups: Registered, Tech Support, Administrators
Posts: 89
Was thanked: 4 time(s) in 4 post(s)
An updated tutorial can be found here:
https://www.leadtools.co...s-and-set-a-license.htmlIn 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:\\LEADTOOLS23\\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";
RasterSupport.setLicense(licensePath, developerKey);
if (RasterSupport.getKernelExpired()) {
System.out.println("License NOT Set Successfully");
} else {
System.out.println("License Set Successfully");
}
}
catch (Exception ex) {
ex.printStackTrace();
}
}
}
Edited by moderator about a year ago
| Reason: updated
Chris Thompson
Developer Support Engineer
LEAD Technologies, Inc.

LEADTOOLS Support
Document
Document SDK FAQ
HOW TO: Set a LEADTOOLS License in Java
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.