简体   繁体   English

UnsatifiedLinkException java —由LTI-CIVIL引起

[英]UnsatifiedLinkException java — caused by LTI-CIVIL

Exception in thread "main" com.lti.civil.CaptureException: java.lang.UnsatisfiedLinkError: no civil in java.library.path
    at com.lti.civil.impl.jni.NativeCaptureSystemFactory.createCaptureSystem(NativeCaptureSystemFactory.java:24)
    at pst.CaptureSystemTest.main(CaptureSystemTest.java:27)
Caused by: java.lang.UnsatisfiedLinkError: no civil in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at com.lti.civil.impl.jni.NativeCaptureSystemFactory.createCaptureSystem(NativeCaptureSystemFactory.java:21)
    ... 1 more

I am attempting to run CaptureSystemTest.java that comes with the lti-civil download. 我试图运行CaptureSystemTest.java随附LTI公务员下载。 I have added that class to my own package in Eclipse and I have added all the jars that came with lti-civil's download. 我将该类添加到了自己在Eclipse的包中,并且添加了lti-civil下载随附的所有jar。

I looked at a similar question to this on stack and the only answer was to add the following code to the program: 我在堆栈上看到了与此类似的问题,唯一的答案是将以下代码添加到程序中:

System.setProperty( "java.library.path", "C:/Work/lti-civil/native/win32-x86/" );
Field fieldSysPath = ClassLoader.class.getDeclaredField( "sys_paths" );
fieldSysPath.setAccessible( true );
fieldSysPath.set( null, null );  

However, Field is flagged as an error with Eclipse giving 18 suggestions for imports. 但是,Eclipse将Field标记为错误,给出了18条导入建议。

My question is: 我的问题是:
How do I start using LTI-CIVIL for application development? 如何开始使用LTI-CIVIL进行应用程序开发?
I mean, what are the things I need to do? 我的意思是,我需要做什么? Like add jars, etc ? 像加罐子等吗?

I don't know what is LTI-CIVIL but typically 3rd party libraries are packaged into jars and you have to include it in your build classpath. 我不知道什么是LTI-CIVIL,但通常将第三方库打包到jar中,您必须将其包含在构建类路径中。 Search for various ways you can add jars to classpath such as this tutorial. 搜索可以将jar添加到类路径的各种方法,例如教程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM