Build a Java library (jar) from C code

Greetings

I am trying to use this api: http://code.google.com/p/vavi-sensor/

to use the macbook accelerometer in Java code.

I put the .c files in my library, but I still get java.lang.UnsatisfiedLinkError: no SmsWrapper in java.library.path

I assume this is because it is still in the .c files, and all of my other libraries are .jar. How can I get this in a bank or other downloadable format (jnilib, etc.)? thank

+3
source share
2 answers

You need to read JNI or JNA . JNA is simpler, but you still need to compile C as a library, and then complete the JNA documentation .

0
source

.c . , , Java.

JNI , -Java- , , C .

0

All Articles