1金币
如题,我们用的是v19版本的,想知道怎么拿到linux下的java开发包。
我看demo中在启动ocr引擎时会先进行一下的操作:
private void run(String[] args) {
try {
// Load LEADTOOLS libraries
if (!loadLibraries())
return;
// Set the license
if (!DemoUtilities.setLicense()) {
System.out.println("Please Set Your Runtime License...\nExiting Demo...");
return;
}
public boolean loadLibraries () {
try {
Platform.setLibPath(DemoUtilities.getLibPath());
Platform.loadLibrary(LTLibrary.LEADTOOLS);
Platform.loadLibrary(LTLibrary.CODECS);
Platform.loadLibrary(LTLibrary.IMAGE_PROCESSING_COLOR);
Platform.loadLibrary(LTLibrary.IMAGE_PROCESSING_CORE);
Platform.loadLibrary(LTLibrary.IMAGE_PROCESSING_EFFECTS);
Platform.loadLibrary(LTLibrary.DOCUMENTS);
Platform.loadLibrary(LTLibrary.SVG);
Platform.loadLibrary(LTLibrary.PDF);
Platform.loadLibrary(LTLibrary.FORMS_DOCUMENT_WRITERS);
Platform.loadLibrary(LTLibrary.FORMS_OCR);
} catch (Exception e) {
e.printStackTrace();
return false;
}
return true;
}
public static String getLibPath() throws UnsupportedEncodingException {
File var0 = (new File(DemoUtilities.class.getProtectionDomain().getCodeSource().getLocation().getPath())).getParentFile();
String var1 = URLDecoder.decode(var0.getAbsolutePath(), "UTF-8");
if (Platform.isWindows()) {
var1 = var1 + "\\..\\CDLLVC10\\";
if (Platform.is64Bit()) {
var1 = var1 + "x64";
} else {
var1 = var1 + "Win32";
}
} else if (Platform.isLinux()) {
var1 = var1 + "/../Lib/";
if (Platform.is64Bit()) {
var1 = var1 + "x64";
} else {
var1 = var1 + "x86";
}
}
System.out.println("LEADTOOLS libPath: " + var1);
return var1;
}
我想知道在java中已经引用了上面的jar包了,为什么还要loadlib一下呢,
而且在这里还区分win版本和linux版本。以后我的工程要部署在linux上的,
我需要在linux上安装一个leadtools吗
|
|