how to load a c lib and invoke it's method in java?

D

dxuranus

just like the title
there are a lot of resources about jni. but these resources usualy
first write the java and then write the c,but now i hava c so what can
i do? thanks for any help
 
C

Chris Uppal

dxuranus said:
there are a lot of resources about jni. but these resources usualy
first write the java and then write the c,but now i hava c so what can
i do? thanks for any help

The straightforward way -- write new JNI code, callable from Java, which itself
calls the existing C code.

The expensive way -- use one of:
http://jniwrapper.com/
http://www.excelsior-usa.com/xfunction.html

The interesting way -- read:
http://java.sun.com/docs/books/jni/index.html
In particular chapter 9, the code for which can also be found from the above
page.

-- chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top