Any possible way to use the Tokyo office in Eclipse?

Just spend 3 hours in a row trying to solve the problem java.lang.UnsatisfiedLinkError: no jtokyocabinet in java.library.pathin Eclipse on Linux.

  • Downloaded TC and TC-Java sources,
  • Built both of them using. / config --prefix = / usr (so all JNI-related must be in / usr / lib)
  • Set LD_LIBRARY_PATH = / usr / lib and CLASSPATH = "$ CLASSPATH: /usr/local/lib/tokyocabinet.jar" and exported as in .profile
  • Imported tokyocabinet.jar into the project.

I am missing a setting other than the correct -Djava.library.path =. settings? I can’t even find anything on the net about jtokyocabineton the Internet or in the documentation. What is the secret sauce to make this thing work?

+3
source share
4

libjtokyocabinet.so... 0 JAVA_HOME/jre/lib/i386.

+1

, tokyocabinet *.so and *.a, /usr/local/lib, :

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

.

+1

, , OpenSUSE 12.3 64 Eclipse. -, kyotocabinet-java :

http://download.opensuse.org/repositories/devel:/libraries:/c_c++/openSUSE_12.3/

/usr/lib64/libjkyotocabinet.so.1.1.0, , kyotocabinet, maven . , slink:

xxxx@xxxx:/usr/lib64> ls -al /usr/lib64/libjkyoto*
/usr/lib64/libjkyotocabinet.so.1 -> libjkyotocabinet.so.1.1.0
/usr/lib64/libjkyotocabinet.so.1.1.0

".1" ...

sudo ln -s libjkyotocabinet.so.1.1.0 libjkyotocabinet.so

/usr/lib64/libjkyotocabinet.so -> /usr/lib64/libjkyotocabinet.so.1.1.0

, ,

System.loadLibrary("jkyotocabinet");

, - , ".so"

+1

, - . Eclipse , , Eclipse, , .

, " " tc.jar( ) .

eclipse /lib, tokyo jar . , ( Eclipse Eclipse), .

0

Source: https://habr.com/ru/post/1754511/


All Articles