You can use C library in Java by using JNI (Java Native Interface).
You can load your C library from your Java code with the following line:
To call the C functions you have to declare native methods in your Java code, for example:
public native void yourMethod();
The name of the C function has to respect the pattern
classname the name of the class in which the Java native method are declared
yourMethod the name of your native method
So with JNI the code you are calling must be made specifically for your application. You can create a C program that will expose the C library and that will be called by your Java appplication.
In order to generate the headers of your exposing C code you can use the tool javah that is in your JDK, it will generate the headers from your Java code: javah - C Header and Stub File Generator
You can find more information about JNI here: Java Native Interface Specification Contents
Hope this helps,