Essentially, the question is this. I have a Java program from which I load a JNI library. Can that JNI library be linked to HotSpot's libjvm.so
shared library, and accordingly call functions unique to HotSpot - that is, outside of jni.h
?
When I try and do so in a straightforward way, the result is the program crashing with:
java: symbol lookup error: /path/to/libtest.so: undefined symbol: _ZNK7oopDesc5klassEv
This gives the appearance of failing to load because it can't resolve the HotSpot-unique oopDesc class. Any suggestions for producing a library that can be linked in such a manner?
Edit: Tried also linking to libjava.so
at compile-time with no success.