Calling C++ from Java, but Java loads the wrong Glibc version
问题 I am trying to call a C++ library from java side and have written necessary jni code. However, when my java code tries to load my C++ library via System.loadLibrary , it complains the following error: Exception in thread "main" java.lang.UnsatisfiedLinkError: libmylib.so: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by libmylib.so) I later found that it is because I have two different GLIBC versions on my system, and the default one is the older one, while libmylib