Is it possible to create custom jni method linker within java application? What exactly I'm trying to do, is to rename or make a links to java native methods under different class path. For example in shared library I have native method declared with class path: com.example.org.SomeClass.someMethod. I would like to invoke this method in a java app from same class, but declared under another package name i.e my.custom.package.name.SomeClass.someMethod
Why I'm trying to do is because I'm using 2 versions of same library in one project which both uses JNI, So I have repacked one version of library with maven shade plugin with a different package name, and I'm getting unsatisfiedlinkerror during invoking JNI method from repacked library