Kartlee
Kartlee

Reputation: 1179

Embedding JNI dll into java

Is it possible to embed JNI dll/so into java executable so we don't need to ship it externally?

Upvotes: 2

Views: 803

Answers (1)

Ernest Friedman-Hill
Ernest Friedman-Hill

Reputation: 81684

There's no monolithic "Java executable" -- java.exe needs a directory tree full of support stuff. You can install your DLL in the "standard extensions" directory inside that tree, though -- native libraries for standard extensions go in ${JAVA_HOME}/lib/ext/i386 (for example) on Linux and Mac, or ${JAVA_HOME}/bin on Windows -- so that the user doesn't install anything extra.

Upvotes: 1

Related Questions