Hi,

This is just a thought. So please don't get mad at me and please don't waste much time over this either. Just wanted to share something that occurred to me.

Now I've done a bit of java and a bit of C. Now what I want to do is to connect the two languages.

I know that there are ways of executing and executable inside a java program (I could have found the way if I had just Googled around).

I could easily write a program in C, make an executable and call it in Java. But what I want is more interactive.

I want them to actually interact. Meaning that a program in C actually giving data to a Java program. Can I do this? Just give me a hint.

Thank you.

Yes, you definitely can do it. If I've captured your requirements correctly, you basically want to "invoke" the functionality implemented by native extensions in your Java code. In that case, look into JNI (the actual specification) and a easier way to go about it using JNA (JNI is too much chore and boilerplate code).

Yes, I think this will do. Thank you very much.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.