简体   繁体   中英

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. 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.

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.

My question is:
How do I start using LTI-CIVIL for application development?
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. Search for various ways you can add jars to classpath such as this tutorial.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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