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

Discussion in 'Java' started by dxuranus, Jul 11, 2006.

  1. dxuranus

    dxuranus Guest

    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
     
    dxuranus, Jul 11, 2006
    #1
    1. Advertising

  2. dxuranus

    Chris Uppal Guest

    dxuranus wrote:

    > 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
     
    Chris Uppal, Jul 11, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jerry051
    Replies:
    2
    Views:
    773
    Oliver Sturm
    Aug 2, 2005
  2. Storm
    Replies:
    1
    Views:
    463
    Chris Uppal
    May 1, 2004
  3. James Yong
    Replies:
    0
    Views:
    571
    James Yong
    Sep 12, 2005
  4. lyallex
    Replies:
    6
    Views:
    550
    lyallex
    Sep 29, 2007
  5. Replies:
    3
    Views:
    2,799
Loading...

Share This Page