mixing java & C on Linux

Discussion in 'Java' started by Drazen Gemic, Sep 29, 2005.

  1. Drazen Gemic

    Drazen Gemic Guest

    I am able to call some C code from Java via JNI.

    Is it possible to compile Java with gcj and call the same
    C code directly ? What needs to be done ?

    DG
    Drazen Gemic, Sep 29, 2005
    #1
    1. Advertising

  2. Drazen Gemic wrote:
    > I am able to call some C code from Java via JNI.
    >
    > Is it possible to compile Java with gcj and call the same
    > C code directly ? What needs to be done ?
    >
    > DG


    sure...
    puzzlecracker, Sep 29, 2005
    #2
    1. Advertising

  3. Drazen Gemic

    Roedy Green Guest

    On Thu, 29 Sep 2005 03:53:18 +0200, Drazen Gemic <>
    wrote or quoted :

    >
    >Is it possible to compile Java with gcj and call the same
    >C code directly ? What needs to be done ?


    I don't think so. The JNI interface would remain the same. It is not
    as though native compilation works by turning Java into C first.
    You could do a quick experiment to see if GCJ in expecting a JNI
    interface for native methods. There are several native classes
    available to download on my website.

    I suggest
    http://mindprod.com/products1.html#PENTIUM
    http://mindprod.com/products1.html#FILETIMES
    http://mindprod.com/products1.html#MOUSE

    http://mindprod.com/products1.html#SETCLOCK is probably a bit too
    complicated.

    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
    Roedy Green, Sep 29, 2005
    #3
  4. Drazen Gemic

    Roedy Green Guest

    Roedy Green, Sep 29, 2005
    #4
  5. David N. Welton, Sep 29, 2005
    #5
    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. valentin tihomirov

    Mixing comb and reg part in one process

    valentin tihomirov, Dec 31, 2003, in forum: VHDL
    Replies:
    7
    Views:
    584
    Oggie
    Jan 2, 2004
  2. viswanath

    mixing sampled sine waves

    viswanath, May 11, 2004, in forum: VHDL
    Replies:
    1
    Views:
    2,021
    Allan Herriman
    May 12, 2004
  3. Lloyd Sheen

    Mixing Server and Client Code

    Lloyd Sheen, Nov 18, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    359
    Dales
    Nov 18, 2003
  4. Dave Benjamin
    Replies:
    2
    Views:
    334
    Dave Benjamin
    Nov 12, 2003
  5. jakester
    Replies:
    1
    Views:
    1,117
    John B. Matthews
    Apr 2, 2009
Loading...

Share This Page