Home » Java » Need an example for the implementation of native Interface library in a Java program (written using package like com.company.app)-Exceptionshub

Need an example for the implementation of native Interface library in a Java program (written using package like com.company.app)-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

please provide an example for the title of this post.
OpenJDK: 1.8.0_232
Platform: Linux

I really need to try the whole process from compiling the c code, java code, and generation of the native dependencies.

Because the native c code done without any consideration of package format in Java application program.
When I am trying to load the library, I am constantly getting the error of NoClassDefFoundException for whatever I try.

I assume I am missing a very subtle step or part.

So, I thought to understand the process. I got only the answers for simple java programs without the package. Even that is working in my test program.
But for the actual application program, I need to use the package format.

Please refer me to the page if there is a similar question asked or any other documentation where I can follow.

How to&Answers: