L
L
Leshiy952017-06-23 23:54:44
Java
Leshiy95, 2017-06-23 23:54:44

Where to load the C ++ library if you use a wrapper for Java (JNI)?

There is a need to use some methods of the Alglib library in C ++ in Java, I decided to use wrappers or JNI. Please tell me where to download the Alglib library, I work on a Macbook (perhaps there are specific directories in os x for such purposes). To be honest, I have never loaded third-party libraries in C)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2017-06-24
@Leshiy95

System.loadLibrary()looks for the library in java.library.path . This property has a different default value on different systems:
Naturally, it can be overridden at your discretion. But the simplest solution is to place the library in the same directory as the executable class file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question