Thread overview
Communication between Java and D application
Sep 13, 2013
Anton Alexeev
Sep 13, 2013
Jonathan M Davis
Sep 14, 2013
Dejan Lekic
Sep 15, 2013
Anton Alexeev
Sep 15, 2013
Michael
Sep 15, 2013
Jonathan M Davis
September 13, 2013
I have a method in a D program which I want to call from a Java program. What is the best way to do this?
September 13, 2013
On Friday, September 13, 2013 22:04:24 Anton Alexeev wrote:
> I have a method in a D program which I want to call from a Java program. What is the best way to do this?

Usually, to have two languages talk to each other, you have to have a C layer in between. So, AFAIK, that's what you have to do, but there may be a better way to handle it in this case that I don't know about.

- Jonathan M Davis
September 14, 2013
On Fri, 13 Sep 2013 22:04:24 +0200, Anton Alexeev wrote:

> I have a method in a D program which I want to call from a Java program. What is the best way to do this?

What you need is Java JNI: http://en.wikipedia.org/wiki/ Java_Native_Interface . There are many examples how to do this in C or C+ +. It should not be any different in D.
September 15, 2013
I meant that the programs are running. So there is a runnung program in D and a running program in Java. What is the best way to communicate between them?
September 15, 2013
Pipes or sockets

September 15, 2013
On Sunday, September 15, 2013 14:47:24 Anton Alexeev wrote:
> I meant that the programs are running. So there is a runnung program in D and a running program in Java. What is the best way to communicate between them?

Have them communicate via sockets just like you'd talk to a program on another machine (except that the IPs will be 127.0.0.1).

- Jonathan M Davis