JNI Java and C Problem

T

Theo

Hi.

I have the following problem. I have an application (with sources)
completely written in C. Now I want to write an Java application with
possibility to exchange data (int, double, String ...) with my CApp. I
have read the JNI tutorial and many posts in many forums.
I can start the JavaApp out of my CApp and give over some data. But I
want to provide some data to my CApp when I press a button for example.


My operating system is a linux debian distribution.

Thanx for any help.
Theo
 
W

Wibble

Theo said:
Hi.

I have the following problem. I have an application (with sources)
completely written in C. Now I want to write an Java application with
possibility to exchange data (int, double, String ...) with my CApp. I
have read the JNI tutorial and many posts in many forums.
I can start the JavaApp out of my CApp and give over some data. But I
want to provide some data to my CApp when I press a button for example.


My operating system is a linux debian distribution.

Thanx for any help.
Theo
So whats the problem? Define a native java method, call javah,
implement the body in C, compile, load .so in java, and call your method
when the button is pushed.
 

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,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top