質問

I have a Glassfish 3.1.1 web application for Java EE 6 running. one of my classes has a native library dependency. I'm using JNI to use this native method. Part of that process involves creating a shared library .so file. In one of my Java classes there will be a System.Loadlibrary("library"); call that references that library.so file.

My questions is, where should I place this shared library as well as the native code that it references in order to access and use this JNI functionality on Glassfish.

I'll need to make calls to several C++ programs that can be moved anywhere on the machine that that Glassfish is hosted on. Should I put them in the domain1/ext folder? add them as a native library to a jar in the build path. How is this done?

正しい解決策はありません

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top