mixing java & C on Linux

D

Drazen Gemic

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
 
P

puzzlecracker

Drazen said:
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...
 
R

Roedy Green

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.
 

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,051
Latest member
CarleyMcCr

Latest Threads

Top