digitalmars.D.learn - Communication between Java and D application
- Anton Alexeev (2/2) Sep 13 2013 I have a method in a D program which I want to call from a Java
- Jonathan M Davis (5/7) Sep 13 2013 Usually, to have two languages talk to each other, you have to have a C ...
- Dejan Lekic (4/6) Sep 14 2013 What you need is Java JNI: http://en.wikipedia.org/wiki/
- Anton Alexeev (3/3) Sep 15 2013 I meant that the programs are running. So there is a runnung
- Michael (1/1) Sep 15 2013 Pipes or sockets
- Jonathan M Davis (4/7) Sep 15 2013 Have them communicate via sockets just like you'd talk to a program on a...
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?
Sep 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
Sep 13 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.
Sep 14 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?
Sep 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
Sep 15 2013