Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
September 13, 2013 Communication between Java and D application | ||||
---|---|---|---|---|
| ||||
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 Re: Communication between Java and D application | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anton Alexeev | 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 Re: Communication between Java and D application | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anton Alexeev | 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 Re: Communication between Java and D application | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dejan Lekic | 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 Re: Communication between Java and D application | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anton Alexeev | Pipes or sockets |
September 15, 2013 Re: Communication between Java and D application | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anton Alexeev | 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
|
Copyright © 1999-2021 by the D Language Foundation